Local js based detection #12

Closed
opened 2023-11-15 18:28:00 +00:00 by jgeorgi · 2 comments
Owner

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).

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).
jgeorgi added the
enhancement
question
labels 2023-11-15 18:28:00 +00:00
jgeorgi self-assigned this 2023-11-15 18:28:00 +00:00
jgeorgi added this to the ALVINN project 2023-11-15 18:28:00 +00:00
jgeorgi added this to the 0.2.0 milestone 2023-11-17 22:01:42 +00:00
Author
Owner

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

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
jgeorgi modified the milestone from 0.2.0 to 0.3.0 2024-01-30 15:45:28 +00:00
Author
Owner

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.

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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ALVINN/ALVINN_f7#12
No description provided.