I have the same request to access previous version. This is a critical Production issue. Adding "builtin/legacy" returns the "new" JSON. I've already posted on Google's Issue Tracker: ID 230865657. Please provide detailed code. Thx.
# Code
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = key_file_location
scopes = ['
https://www.googleapis.com/auth/analytics.readonly']
service = build('vision', 'v1')
with open(image_file, 'rb') as image:
image_content = base64.b64encode(image.read())
service_request = service.images().annotate(body={
'requests': [{
'image': {
'content': image_content.decode('UTF-8')
},
'features': [
{
"model": "builtin/legacy" ### Does not work. Returns "new" JSON ####
},
{
"type": "DOCUMENT_TEXT_DETECTION"
},
{
"type": "TEXT_DETECTION"
},
{
"type": "FACE_DETECTION"
},
{
"type": "LANDMARK_DETECTION"
},
{
"type": "LOGO_DETECTION"
},
{
"type": "LABEL_DETECTION"
},
{
"type": "SAFE_SEARCH_DETECTION"
},
{
"type": "IMAGE_PROPERTIES"
},
{
"type": "CROP_HINTS"
},
{
"type": "WEB_DETECTION"
},
{
"type": "PRODUCT_SEARCH"
},
{
"type": "OBJECT_LOCALIZATION"
},
{
"type": "TYPE_UNSPECIFIED"
}]
}]
})
response = service_request.execute()
# End Code