【问题标题】:Improving ML Kit Image labeling改进 ML Kit 图像标记
【发布时间】:2019-08-25 01:53:12
【问题描述】:

我正在尝试通过相机使用 ML-Kit 图像标签来检测手中的物品。例如,如果我向它展示苏打水,它会拾起手、脸、背景等物体……我不感兴趣的东西,然后即使在 0.25 分钟后也找不到手中的物体使用云视觉的准确性。

有没有办法限制视觉寻找的内容或其他提高准确性的方法?

PS:如果这个任务有更好的东西,我也愿意切换 API。

//This is mostly from a google tutorial 
private fun runCloudImageLabeling(bitmap: Bitmap) {
    //Create a FirebaseVisionImage
    val image = FirebaseVisionImage.fromBitmap(bitmap)

    val detector = FirebaseVision.getInstance().visionCloudLabelDetector

    //Use the detector to detect the labels inside the image
    detector.detectInImage(image)
            .addOnSuccessListener {
                // Task completed successfully
                progressBar.visibility = View.GONE
                itemAdapter.setList(it)
                sheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED)
            }
            .addOnFailureListener {
                // Task failed with an exception
                progressBar.visibility = View.GONE
                Toast.makeText(baseContext, "Sorry, something went wrong!", Toast.LENGTH_SHORT).show()
            }
}

能够高精度检测手中的物品。

【问题讨论】:

    标签: android kotlin firebase-mlkit


    【解决方案1】:

    在 Firebase ML Kit 使用的内置对象检测模型中,没有任何设置可以控制准确性。

    如果您想要更准确的检测,您有两种选择:

    1. 调用 Cloud Vision,这是一种服务器端 API,可以检测更多对象类别,并且通常具有更高的准确度。这是一个付费 API,但它确实带有免费配额。这是comparison page in the documentation了解详情。

    2. 训练您自己的模型,使其更适合您关心的图像类型。然后您可以在您的应用中use this custom model 以获得更好的准确性。

    【讨论】:

      【解决方案2】:

      ML Kit 提供了可用于定位对象的Object Detection & Tracking API

      该 API 允许您过滤突出的对象(靠近取景器的中心),即您示例中的汽水罐。 API 返回对象周围的边界框,您可以使用它来裁剪并随后通过 Image Labeling API 提供它。这允许您过滤掉所有不相关的背景和/或其他对象。

      【讨论】:

      • 您能解释一下如何同时使用图像标签和对象检测来获得绑定框吗?
      猜你喜欢
      • 2020-11-09
      • 2022-06-22
      • 1970-01-01
      • 1970-01-01
      • 2021-01-23
      • 2023-03-02
      • 2021-02-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多