Local js based detection #12
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I wonder how difficult it is to get local detection running on the vue app? Studio app has access to the pytorch java classes. Don't know what possibilities there are for js (probably fewer).
Looks like the best way to do this is going to be using TensorFlow.js which has some instructions (albeit, not beginner level) for converting a pytorch model and making predictions in js.
https://www.tensorflow.org/js/tutorials/conversion/pretrained_model
Turns out the pytorhc?/yolov5? library export.py now does a perfectly fine job converting pt weights to tf weights.
There is also an example of how to run detections using the resulting tf web model here:
https://github.com/zldrobit/tfjs-yolov5-example/blob/main/src/index.js#L70-L87
This actually shouldn't be too hard.