-
Notifications
You must be signed in to change notification settings - Fork 40
add legacy object detection cocossd code and example from p5js #257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Yay! Great job @yiyujin! As discussed, if it's helpful here's a quick list of things that we changed with ml5.js 1.0.
|
…urn result not error
…ct (instance.model), added mediaReady utils so that detection waits for video to be ready before detecting, updated tf.backend to webgl to avoid webgpu warning
Thank you @shiffman for the neat instructions!
|
Based on today's meetup with @shiffman cc.@nasif-co After all, final output for the project would be the p5js example code. Example code (in order of priority) : bcd1788
I guess next will be the docs, which I can draft out in parallel with the code ! |
…de to call detectStart in setup()
I made the 3 changes to code so it works with ml5.js 1.0 💪 This week, I want to digest code better and draft a docs that explains the common pattern (functions and its roles) used across models : start, stop etc. I need it for myself anyways + could be a useful onboarding docs for future dev team. Some notes on naming conventions : (speaking of which.. I think my branch should have been object-detector, not object-detection..? 😭)
|
After a brief code review from @pearmini 🙏 (wow I mindlessly copied the code to begin with then didn't think through!)
@pearmini can you take a glance at this please? |
Just dropping notes for future tasks :
|
@shiffman how does the example code for webcam look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @yiyujin fantastic work! I left a few small comments in the basic example!
…ng transparent canvas on top of video)
I updated the three example codes -> bcd1788 - webcam (examples/objectDetection-webcam/sketch.js) I'm esp. not sure if the video file example is at its best, since I'm adding a bunch of video eventListeners to check if video is loadedmetadata/play/pause/ended. I don't think p5 has a method on video to do that if I'm correct.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple last small comments on the video example and then some discoveries about video resizing! Great work @yiyujin!
https://github.com/ml5js/ml5-next-gen/tree/main/examples#p5js-20-examples -> will be handled in another PR |
937ba8b
to
02bdb6d
Compare
29dd4c9
to
83395bd
Compare
e06c99c
to
5fabd31
Compare
Removed unused typedefs for options and predictions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@pearmini It has npm install error. Can you look ? |
Bring back object detection in ml5.js
To start, I added legacy object detection code) and p5js example code. Example code is from github reference doc
History
Make code compatible with ml5 1.0Make code scalable to support more models
Next Steps
- p5 2.0 examples : Having this coco-ssd work with p5.js 2.0 is priority over supporting Transformers.js.