ml5js / ml5-library

Friendly machine learning for the web! 🤖
https://ml5js.org
Other
6.38k stars 906 forks source link

Remove 'orUrl' from 'modelNameOrUrl' in objectDetector #1470

Open juilie opened 10 months ago

juilie commented 10 months ago

The objectDetector used 'modelNameOrUrl' as the name for the model parameter. This naming seems misleading to me - it seems like maybe there was thought to include the ability to use a url for other models, but the code only uses yolo or coco, and defaults to coco if a url is used with no warning.

For example: objectDetector('./myModel.json') or objectDetector('https://myWebsite.com/myModel.js') will both result in cocossd being used. To me, this means this parameter only takes a 'modelName'.