Google Cloud Vision徽标检测API-无法识别徽标

问题描述 投票:0回答:1

我正在尝试从网站上抓取图像,并使用Google Cloud Vision API来检测网站上的图像是否是徽标。如果我提供苹果这样的徽标,它就可以使用,但是尽管图像显然是徽标,但它似乎不适用于非财富500强的知名科技公司徽标(例如LaunchDarkly,LogDNA等)。它适用于任何类型的徽标还是仅适用于大型品牌?有没有适合我需要的解决方案?

client = vision.ImageAnnotatorClient()
with io.open('./img.png', 'rb') as image_file:
        content = image_file.read()
        image = vision.types.Image(content=content)
        response = client.logo_detection(image=image)
        logos = response.logo_annotations
        for logo in logos:
            print(logo.description)
            print(logo.score)

        if response.error.message:
            raise Exception(
                '{}\nFor more info on error messages, check: '
                'https://cloud.google.com/apis/design/errors'.format(
                    response.error.message))
python machine-learning computer-vision google-vision
1个回答
0
投票

the documentation中所述,徽标检测可检测热门产品徽标。预期它不会检测到尚未训练模型的徽标。

您可以在CGP中尝试的解决方案是AutoML Vision。该产品可让您重新训练GCP模型,以根据自己定义的标签对图像进行分类。您可以创建带有徽标的数据集,以检测和重新训练模型。即使您没有任何机器学习专业知识,它也具有非常简单的界面就可以执行此操作。

© www.soinside.com 2019 - 2024. All rights reserved.