-
Create a conda enviroment with python 3.6.5 and activate it.
conda create --name sign_det python=3.6.5
conda activate sign_det
-
Install tensorflow 1.13.1 and tensorflow-gpu 1.13.1. It is crucial to install it both with pip and conda.
pip install tensorflow==1.13.1 --upgrade
conda install tensorflow==1.13.1
pip install tensorflow-gpu==1.13.1 --upgrade
conda install tensorflow-gpu==1.13.1
-
Install keras-retinanet 0.5.1.
-
Clone keras-retinanet repository.
git clone https://github.com/fizyr/keras-retinanet.git
-
Move to the keras-retinanet folder.
cd keras-retinanet
-
Create a branch from 0.5.1 and switch to it.
git checkout -b branch0.5.1 0.5.1
-
Install it.
pip install . --upgrade
-
-
Install keras-maskrcnn 0.2.2.
-
Clone keras-maskrcnn repository.
git clone https://github.com/fizyr/keras-maskrcnn.git
-
Move to the keras-maskrcnn folder.
cd keras-maskrcnn
-
Create a branch from 0.2.2 and switch to it.
git checkout -b branch0.2.2 0.2.2
-
Install it.
pip install . --upgrade
-
-
Install keras 2.2.5.
pip install keras==2.2.5 --upgrade
-
Install matplotlib with dependencies.
pip install matplotlib --upgrade
conda install matplotlib
-
Install exiftool.
sudo apt-get install exiftool
-
Clone this repository.
git clone https://github.com/Jozko55/bike_signs_detection.git
-
Download the model separately.
You may need to adjustPATH_TO_MODEL
inscript.py
.
Firstly, create a folder where both input pictures and outputs will be stored. The folder must contain two separate folders named inputs
and outputs
. The subfolder inputs
should contain your input pictures. The subfolder outputs
should be empty.
Now, adjust accordingly the variable path_to_data
in the file script.sh
. (By default it is the path to sample_data
.)
Finally, run everything.
./script.sh
There will be exactly 4 output files generated for every detected bike sign on an input picture.
_mask.JPG
_box.JPG
_exif.json
(generated by exiftool from original picture)_info.json
(name of detected sign and given score)