You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EntityAnnotation annotation : res.getLabelAnnotationsList()
there are no items in that. It was working fine some time back, now stopped working. I'm using:
com.google.cloud
google-cloud-vision
0.17.1-beta
It's possible that the results returned from ML APIs change, meaning an image that returned labels before no longer returns labels. I'm very surprised that you are not seeing any labels returned though. For me, sending a transparent image with just a few pixels in it returns labels.
Is the issue occurring with all images or just a specific one? Are you seeing any errors from the API?
@gguuss it was the same behavior for all the images, those images when uploaded in google vision API home page is showing labels correctly. Even actual response from the API is having labels. I took the raw response and passed it to my custom parser to bypass.
One more issue with APIs is the raw response of APIs is different from REST response. For example, in one it has 'Joy_Likelihood' and other has 'joylikelihood'. I noticed this because of my custom parser. As ML libraries are not working in GAE environment, I replaced APIs with REST calls then my parser started giving issues.
In short, the issue you're experiencing is that we do not have good support for Tomcat in the Cloud Client library for Java (those in the com.google.cloud namespace). The issue I linked is collecting feedback on what behavior you're experiencing from the API so they can resolve those behaviors in a future release of the client library.
As you have effectively moved to your own client libraries (built around REST), it is expected that some of the behaviors will be different from those provided by the client libraries team. You might want to try using the Apiary client library for Vision as a middle ground solution with constants more idiomatic to Java and broader current platform support.
Activity
lesv commentedon May 8, 2017
@gguuss PTAL
gguuss commentedon May 8, 2017
It's possible that the results returned from ML APIs change, meaning an image that returned labels before no longer returns labels. I'm very surprised that you are not seeing any labels returned though. For me, sending a transparent image with just a few pixels in it returns labels.
Is the issue occurring with all images or just a specific one? Are you seeing any errors from the API?
gguuss commentedon May 16, 2017
This looks related to this issue. @buddhapuneeth it may be helpful for the Google Cloud Client library team to have your input.
buddhapuneeth commentedon May 16, 2017
@gguuss it was the same behavior for all the images, those images when uploaded in google vision API home page is showing labels correctly. Even actual response from the API is having labels. I took the raw response and passed it to my custom parser to bypass.
One more issue with APIs is the raw response of APIs is different from REST response. For example, in one it has 'Joy_Likelihood' and other has 'joylikelihood'. I noticed this because of my custom parser. As ML libraries are not working in GAE environment, I replaced APIs with REST calls then my parser started giving issues.
gguuss commentedon May 16, 2017
In short, the issue you're experiencing is that we do not have good support for Tomcat in the Cloud Client library for Java (those in the com.google.cloud namespace). The issue I linked is collecting feedback on what behavior you're experiencing from the API so they can resolve those behaviors in a future release of the client library.
As you have effectively moved to your own client libraries (built around REST), it is expected that some of the behaviors will be different from those provided by the client libraries team. You might want to try using the Apiary client library for Vision as a middle ground solution with constants more idiomatic to Java and broader current platform support.
nnegrey commentedon Dec 5, 2018
This appears to have been resolved. Please feel free to reopen if this is not true. :)
deps: update dependency org.springframework.boot:spring-boot-starter-…
deps: update dependency org.springframework.boot:spring-boot-starter-…
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
deps: update dependency com.google.cloud:google-cloud-storage to v2.1…
samples: migrate code from googleapis/java-aiplatform (#7451)