【发布时间】:2021-10-23 05:12:59
【问题描述】:
我正在准备集成我的自定义 YOLO 模型(我尝试使用 YOLOv3 和 YOLOv4)以像 https://stackoverflow.com/a/62990869/9420938 中显示的那样颤动。但是,当我调用 Tflite.detectObjectOnFrame() 时,模型总是返回一个空数组。如果我调用 Tflite.runModelOnFrame() 它返回对象的标签,但不返回边界框。有人知道会发生什么吗?
Tflite.loadModel(
model: "assets/yolov3-tiny-416.tflite",
labels: "assets/labels.txt",
numThreads: 1, // defaults to 1
isAsset: true, // defaults to true, set to false to load resources outside assets
useGpuDelegate: false // defaults to false, set to true to use GPU delegate
).then((res){
_initialized = res;
});
var recognitions = await Tflite.detectObjectOnFrame(
model: "YOLOv3",
bytesList: image.planes.map((plane) {return plane.bytes;}).toList(),// required
imageHeight: image.height,
imageWidth: image.width,
imageMean: 0,
imageStd: 255.0,
numResultsPerClass: 2,
numBoxesPerBlock: 5,
threshold: 0.3,
blockSize: 32,
asynch: true
);
【问题讨论】:
标签: flutter object-detection tensorflow-lite yolo yolov4