Open zlqhem opened 6 months ago
reusing exisiting pytorch_lite ui. It has already implemented rendering bounding box for object detection result.
https://github.com/zezo357/pytorch_lite/blob/master/lib%2Fpytorch_lite.dart#L643 https://github.com/zezo357/pytorch_lite/blob/master/example/lib/run_model_by_image_demo.dart#L231C38-L231C56 https://github.com/zezo357/pytorch_lite/blob/master/lib/pytorch_lite.dart#L411 https://github.com/zezo357/pytorch_lite/blob/8c7bb693dabf181f7c03398a46bf8b58410f5f63/lib/pigeon.dart#L57
class ResultObjectDetection {
ResultObjectDetection({
required this.classIndex,
this.className,
required this.score,
required this.rect,
});
Adapting backend result into pytorch lite's input format seems not simple.
Draw bounding box directly.