我正在尝试通过相机使用ML-Kit图像标签来检测手中持有的物品。例如,如果我给它看一瓶汽水,它可以拾取物体,比如手,脸,背景等等……我不感兴趣的东西,然后找不到手中的对象,即使在.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()
}
}能够以高精度检测手中的内容。
发布于 2019-08-25 12:01:13
Firebase ML Kit使用的内置对象检测模型中没有控制准确性的设置。
如果您想要更精确的检测,您有两个选择:
发布于 2019-08-30 09:44:02
ML工具包提供了可用于定位对象的Object Detection & Tracking API。
该API允许您过滤突出的对象(靠近取景器的中心),即示例中的苏打罐。API返回对象周围的边界框,您可以使用它来裁剪并随后通过图像标签API对其进行馈送。这允许您过滤掉所有不相关的背景和/或其他对象。
https://stackoverflow.com/questions/57642698
复制相似问题