- Goal of this project
- Teammembers
- Set up the Applicaiton
- How to use the Application
- Train your own Model
The goal of this project is it to deliver an application with following functionalities:
- adjustment of the application
- prediction of traffic cones on a given picture
- calculation of distance from camera to cones and cones to cones
For further detail please have a look at the paper for this project.
- Stephan Lenert
- Peter Behrens
- Tom Müller
- Luca Stuckenborg
- Python version 3.7.7 is recomended due to library compatibility
- Clone the git repository
- Move in the git bash to the desired dictionary and execute
git clone https://github.com/StephanDieGeileSau/pylone-detection.git
- Move in the git bash to the desired dictionary and execute
- Install pip dependencies
- Move into the pylone-detection dictionary
cd \pylone-detection
- Install the dependencies and python libaries
pip install -r requirements.txt
- Move into the pylone-detection dictionary
- Test the application
- Execute via python the predict.py file (
python predict.py
) - If everything workes you should find now 5 images with boxes in the
.\output
folder
- Execute via python the predict.py file (
- The application is set up!
- Take a picture as described in the project paper
- Place the picture in the
.\adjust
folder - Run
python adjust.py
- The adjustment values get stored in the
adjust.json
file
The for the prediction used model can be changed in the model.py
file. The line and values you can palce, are noted as comments.
You can also predict multiple images at the same time, just place all images you want predicted in the same folder.
- Take pictures for prediction
- Place the pictures in the
.\images
folder (to use a specific path pass the path as parameter to thepredict.py
in step 3.) - Run the prediction via
python predict.py
you can also specify the input and outpur directorypython predict.py -i<path to input dir> -o<path to output dir>
(default input:.\images
and output:.\output
) - Now you can find the predicted images in the corresponding folder
- Place one image you want to be calculated in the
.\predict
folder - Run
python calc_2d_map.py
- You will see the meassured distances as print out in the command line
- y_b stands for distance between the cones
- b stands for the distance from the camera to the blue cone
- y stands for the distance from the camera to the yellow cone
- if there is only one of two cone types detected the not meassureable values will have the value
None
If you want to train your own Object Detection Model, based on one of the already existing Models in the Tensorflow Zoo, we recommend you to follow the tutorial of Joseph Nelson.