Detect objects in a photo with pretrained ssd_mobilenet_V1_coco_11_06_2017
model.
- Download ssd_mobilenet_v1_coco_11_06_2017.tar.gz
- Unpack
- Copy
frozen_inference_graph.pb
file to this directory from there.
Redefine mscoco_label_map.pbtxt
as a list of (id, display_name)
.
If you want to use virtualenv
like me,
python3 -m virtualenv venv
source venv/bin/activate
and then install other dependencies.
pip install -r requirements.txt
python inference.py image.jpg
$ python inference.py image.jpg
Detect object from a photo: image.jpg
[('book', 0.3387419), ('bench', 0.11134028), ...]