A Real-time ship detector using Tensorflow Object Detection API and OpenCV.
- Ubuntu 16.04
- Python 3.5
- TensorFlow 1.9
- OpenCV 3.2
Creating virtualenv
$ cd Ship-Detector
$ virtualenv env --python=python3.5
$ source env/bin/activate
Install Dependencies
$ pip install -r requirements.txt
Binding OpenCV
$ cp /usr/local/lib/python3.5/dist-packages/cv2.cpython-35m-x86_64-linux-gnu.so \
~/Ship-Detector/env/lib/python3.5/site-packages
Download the frozen inference graph (ssd_mobilenet_v1_ship_15000) from the Google Drive.
Run
$ python detector.py
Optional arguments (default value):
- Video to test
--video=test.mp4
- Device index of the camera
--camera=None
- Saved model name
--model=ssd_inception_v2_ship_15000
Requirements (Install reference)