https://github.com/shadowhijackers/object-detector-in-js
Object detector while uploading in javascript using ml5js and mobilenet.
https://github.com/shadowhijackers/object-detector-in-js
Last synced: 3 months ago
JSON representation
Object detector while uploading in javascript using ml5js and mobilenet.
- Host: GitHub
- URL: https://github.com/shadowhijackers/object-detector-in-js
- Owner: shadowhijackers
- License: mit
- Created: 2020-09-26T17:39:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-26T17:52:46.000Z (over 5 years ago)
- Last Synced: 2025-02-27T07:16:50.802Z (over 1 year ago)
- Language: HTML
- Size: 680 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# object-detector-in-js
Object detector while uploading in javascript using ml5js and mobilenet.
# Code Explantion
We are loading the ml5.js library source code in our index. html file for access to the ml5js APIs (machine learning functionalities.
Load your image classification model by using the “ml5.imageClassifier('MobileNet', modelLoaded);” modelLoaded is the function definition which is used to know whether the model was loaded or not. Here we use 'MobileNet’. This is the pretrained model. That is able to categories or detect the 1000 of objects. If you want to detect new one you need to create your
Own model.
The following link for mobilenet image categories.
https://github.com/tensorflow/tfjs-models/blob/master/mobilenet/src/imagenet_classes.ts
Bind the detectImage function to upload file input onchange events. So When the image was uploaded the detectImage function will call and there our classify method will detect the image.
After it will call our getResult function then we can get the detected image result.
