jveitchmichaelis / edgetpu-yolo

Minimal-dependency Yolov5 and Yolov8 export and inference demonstration for the Google Coral EdgeTPU
89 stars 31 forks source link

Support yolov8 pose estimation #20

Open tonhathuy opened 1 month ago

tonhathuy commented 1 month ago

Thank you, this project is great! can I run this repo with yolov8 pose estimation? What do I have to adjust in the code to make it work? thanks

jveitchmichaelis commented 1 month ago

If you can export your model as an EdgeTPU file then you would need to add the post-processing code to convert the output into whatever format you expect the keypoints to be in. So the first step would be to run the model and inspect the output - if it's just a bunch of keypoints then you might not need to do much else. I guess minimally you have to re-scale the coordinates to the original image dimensions?

Currently there is no "support" for pose estimation, in that the repo was built for object detection (so there are a bunch of other post-processing steps like non-max suppression, coordinate scaling, etc). However the core code that takes an image and runs it through the EdgeTPU should work with your model. I'd be happy to merge a PR if you get it working and feel free to ask if you have questions about the code.

e.g. this function: https://github.com/jveitchmichaelis/edgetpu-yolo/blob/283644dc2732a829d4a76cf0b370e28f05afe2e5/edgetpumodel.py#L135