docker pull ajinkyabobade93/ssd-detection-app
sudo docker run -it -d -p 5000:5000 ajinkyabobade93/ssd-detection-app
API call:
git clone https://github.com/ajinkya933/pytorch-flask-docker-object-detection-API
curl -X POST -F image=@dog.jpg 'http://localhost:5000/predict'
mkdir weights
cd weights
wget https://s3.amazonaws.com/amdegroot-models/ssd300_mAP_77.43_v2.pth
sudo docker build -t ssd-detection-app:latest .
sudo docker run -it ssd-detection-app
sudo docker run -it -d -p 5000:5000 ssd-detection-app
Now your docker runs and to get inference use below command:
curl -X POST -F image=@dog.jpg 'http://localhost:5000/predict'
example:response:
{"predictions":[{"coords":"((1606.664, 432.6262), 2050.30419921875, 2590.77685546875)","label":"dog","probability":0.9925073981285095}],"success":true}