Basic API for posting images and getting the result of detection. Uses COCO SSD pretrained model to detect objects in 300x300 px images. List of object names
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Clone the repo in your environment
git clone https://github.com/gnurgeldiyev/object-detection-api.git
# move into project folder
cd object-detection-api
# install the dependencies
yarn install
# rename the .env.sample
mv .env.sample .env
# add your variables
nano .env
yarn start
# POST - /detection
curl -H "Content-Type: application/octet-stream" --data-binary "@image/bicycle 300x300.jpg" "http://localhost:3000/detection"
{
"duration": 171,
"result": [
{
"bbox": [
5.610904097557068,
85.95118224620819,
295.6936866044998,
171.45759165287018
],
"class": "bicycle",
"score": 0.9325430393218994
}
]
}
yarn test
- Express - The web framework used
- Tensorflow.js - For using ML model
- COCO SSD - Pretrained Model for Object Detection
- Jest - For testing
- SuperTest - For testing HTTP API
This project is licensed under the MIT License - see the LICENSE file for details