How to call for “Label Detection” and “Safe Search Detection” at a time on Google Cloud Vision API
up vote
0
down vote
favorite
I would like to ask you the the following thing about Vision API.
The following picture indicates that I can take on "Free with Label Detection, or $1.50", if I will use "Label Detection".
But, I didn't find out how to use both of them at the same time in a tutorial on "Label Detection" and "Safe Search Detection" both.
- Can I use both of services at a time in Python?
- If so, how can I call for them?
I will really appreciate that if you tell me.

python google-cloud-vision
add a comment |
up vote
0
down vote
favorite
I would like to ask you the the following thing about Vision API.
The following picture indicates that I can take on "Free with Label Detection, or $1.50", if I will use "Label Detection".
But, I didn't find out how to use both of them at the same time in a tutorial on "Label Detection" and "Safe Search Detection" both.
- Can I use both of services at a time in Python?
- If so, how can I call for them?
I will really appreciate that if you tell me.

python google-cloud-vision
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I would like to ask you the the following thing about Vision API.
The following picture indicates that I can take on "Free with Label Detection, or $1.50", if I will use "Label Detection".
But, I didn't find out how to use both of them at the same time in a tutorial on "Label Detection" and "Safe Search Detection" both.
- Can I use both of services at a time in Python?
- If so, how can I call for them?
I will really appreciate that if you tell me.

python google-cloud-vision
I would like to ask you the the following thing about Vision API.
The following picture indicates that I can take on "Free with Label Detection, or $1.50", if I will use "Label Detection".
But, I didn't find out how to use both of them at the same time in a tutorial on "Label Detection" and "Safe Search Detection" both.
- Can I use both of services at a time in Python?
- If so, how can I call for them?
I will really appreciate that if you tell me.

python google-cloud-vision
python google-cloud-vision
asked Nov 7 at 18:51
Ryohei De Iwata
357
357
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
In case you want to send both types at the same time, you can use the annotate_image() method; in this way, you can specify all the features that need to be included in the same request. Based on this, I recommend you to take a look on this documentation (Doc1, Doc2) to get detailed information about this property usage, as well as this tutorial, that contains a curl command example where is shown the process required to send multiple features within the same call that you can use as an alternative workaround.
import io
import os
from google.cloud import vision
client = vision.ImageAnnotatorClient()
response = client.annotate_image({
'image': {'source': {'image_uri': '<IMAGE_URI>'}},
'features': [{'type': vision.enums.Feature.Type.SAFE_SEARCH_DETECTION},
{'type': vision.enums.Feature.Type.LABEL_DETECTION}]
})
print(response)
Additionally, I think that this pricing information refers that you can use the Safe Search Detection feature for free if you use it with Label Detection; however, the Label Detection requests will be billed with the corresponding charges that are displayed at the Prices document.
Thank you so much for your help. I will try what you told me.
– Ryohei De Iwata
Nov 8 at 16:31
My pleasure, let me know if it works for you.
– Armin_SC
Nov 8 at 16:37
I made it! Thank you so much! You have saved me!
– Ryohei De Iwata
Nov 8 at 22:46
Awesome! I'm glad it worked for you
– Armin_SC
Nov 8 at 22:47
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
In case you want to send both types at the same time, you can use the annotate_image() method; in this way, you can specify all the features that need to be included in the same request. Based on this, I recommend you to take a look on this documentation (Doc1, Doc2) to get detailed information about this property usage, as well as this tutorial, that contains a curl command example where is shown the process required to send multiple features within the same call that you can use as an alternative workaround.
import io
import os
from google.cloud import vision
client = vision.ImageAnnotatorClient()
response = client.annotate_image({
'image': {'source': {'image_uri': '<IMAGE_URI>'}},
'features': [{'type': vision.enums.Feature.Type.SAFE_SEARCH_DETECTION},
{'type': vision.enums.Feature.Type.LABEL_DETECTION}]
})
print(response)
Additionally, I think that this pricing information refers that you can use the Safe Search Detection feature for free if you use it with Label Detection; however, the Label Detection requests will be billed with the corresponding charges that are displayed at the Prices document.
Thank you so much for your help. I will try what you told me.
– Ryohei De Iwata
Nov 8 at 16:31
My pleasure, let me know if it works for you.
– Armin_SC
Nov 8 at 16:37
I made it! Thank you so much! You have saved me!
– Ryohei De Iwata
Nov 8 at 22:46
Awesome! I'm glad it worked for you
– Armin_SC
Nov 8 at 22:47
add a comment |
up vote
1
down vote
accepted
In case you want to send both types at the same time, you can use the annotate_image() method; in this way, you can specify all the features that need to be included in the same request. Based on this, I recommend you to take a look on this documentation (Doc1, Doc2) to get detailed information about this property usage, as well as this tutorial, that contains a curl command example where is shown the process required to send multiple features within the same call that you can use as an alternative workaround.
import io
import os
from google.cloud import vision
client = vision.ImageAnnotatorClient()
response = client.annotate_image({
'image': {'source': {'image_uri': '<IMAGE_URI>'}},
'features': [{'type': vision.enums.Feature.Type.SAFE_SEARCH_DETECTION},
{'type': vision.enums.Feature.Type.LABEL_DETECTION}]
})
print(response)
Additionally, I think that this pricing information refers that you can use the Safe Search Detection feature for free if you use it with Label Detection; however, the Label Detection requests will be billed with the corresponding charges that are displayed at the Prices document.
Thank you so much for your help. I will try what you told me.
– Ryohei De Iwata
Nov 8 at 16:31
My pleasure, let me know if it works for you.
– Armin_SC
Nov 8 at 16:37
I made it! Thank you so much! You have saved me!
– Ryohei De Iwata
Nov 8 at 22:46
Awesome! I'm glad it worked for you
– Armin_SC
Nov 8 at 22:47
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
In case you want to send both types at the same time, you can use the annotate_image() method; in this way, you can specify all the features that need to be included in the same request. Based on this, I recommend you to take a look on this documentation (Doc1, Doc2) to get detailed information about this property usage, as well as this tutorial, that contains a curl command example where is shown the process required to send multiple features within the same call that you can use as an alternative workaround.
import io
import os
from google.cloud import vision
client = vision.ImageAnnotatorClient()
response = client.annotate_image({
'image': {'source': {'image_uri': '<IMAGE_URI>'}},
'features': [{'type': vision.enums.Feature.Type.SAFE_SEARCH_DETECTION},
{'type': vision.enums.Feature.Type.LABEL_DETECTION}]
})
print(response)
Additionally, I think that this pricing information refers that you can use the Safe Search Detection feature for free if you use it with Label Detection; however, the Label Detection requests will be billed with the corresponding charges that are displayed at the Prices document.
In case you want to send both types at the same time, you can use the annotate_image() method; in this way, you can specify all the features that need to be included in the same request. Based on this, I recommend you to take a look on this documentation (Doc1, Doc2) to get detailed information about this property usage, as well as this tutorial, that contains a curl command example where is shown the process required to send multiple features within the same call that you can use as an alternative workaround.
import io
import os
from google.cloud import vision
client = vision.ImageAnnotatorClient()
response = client.annotate_image({
'image': {'source': {'image_uri': '<IMAGE_URI>'}},
'features': [{'type': vision.enums.Feature.Type.SAFE_SEARCH_DETECTION},
{'type': vision.enums.Feature.Type.LABEL_DETECTION}]
})
print(response)
Additionally, I think that this pricing information refers that you can use the Safe Search Detection feature for free if you use it with Label Detection; however, the Label Detection requests will be billed with the corresponding charges that are displayed at the Prices document.
answered Nov 8 at 16:11
Armin_SC
82427
82427
Thank you so much for your help. I will try what you told me.
– Ryohei De Iwata
Nov 8 at 16:31
My pleasure, let me know if it works for you.
– Armin_SC
Nov 8 at 16:37
I made it! Thank you so much! You have saved me!
– Ryohei De Iwata
Nov 8 at 22:46
Awesome! I'm glad it worked for you
– Armin_SC
Nov 8 at 22:47
add a comment |
Thank you so much for your help. I will try what you told me.
– Ryohei De Iwata
Nov 8 at 16:31
My pleasure, let me know if it works for you.
– Armin_SC
Nov 8 at 16:37
I made it! Thank you so much! You have saved me!
– Ryohei De Iwata
Nov 8 at 22:46
Awesome! I'm glad it worked for you
– Armin_SC
Nov 8 at 22:47
Thank you so much for your help. I will try what you told me.
– Ryohei De Iwata
Nov 8 at 16:31
Thank you so much for your help. I will try what you told me.
– Ryohei De Iwata
Nov 8 at 16:31
My pleasure, let me know if it works for you.
– Armin_SC
Nov 8 at 16:37
My pleasure, let me know if it works for you.
– Armin_SC
Nov 8 at 16:37
I made it! Thank you so much! You have saved me!
– Ryohei De Iwata
Nov 8 at 22:46
I made it! Thank you so much! You have saved me!
– Ryohei De Iwata
Nov 8 at 22:46
Awesome! I'm glad it worked for you
– Armin_SC
Nov 8 at 22:47
Awesome! I'm glad it worked for you
– Armin_SC
Nov 8 at 22:47
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53195930%2fhow-to-call-for-label-detection-and-safe-search-detection-at-a-time-on-googl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown