我在我的节点应用程序中使用了Image labels detection的Google vision API。 我正在尝试获取标签多边形,但它返回null。
const client = new visionClient.ImageAnnotatorClient();
client
.labelDetection('./test.jpg')
.then(results => {
console.log(results[0]);
const labels = results[0].labelAnnotations;
console.log('Labels:');
labels.forEach(label => console.log(label.description));
})
.catch(err => {
console.error('ERROR:', err);
});
结果:
[ { locations: [],
properties: [],
mid: '/m/0j272k5',
locale: '',
description: 'eyewear',
score: 0.9805809855461121,
confidence: 0,
topicality: 0.9805809855461121,
boundingPoly: null }]
boundingPoly:null