This directory contains PyTorch YOLOv3 software developed by Ultralytics LLC, and is freely available for redistribution under the GPL-3.0 license. For more information please visit https://www.ultralytics.com.
YOLOv3 was taken from here, and was upgraded for the emergency venicle detection and tracking task.
Python 3.7 or later with the following pip3 install -U -r requirements.txt
packages:
cython
numpy
torch >= 1.1.0
opencv-python
tqdm
numba
scikit-learn
scikit-image
filterpy
And may be smth else :)
Downloading docker image from dockerhub: docker pull morememes/emergency-tracker:latest
Building docker image from dockerfile: docker build -t morememes/emergency-tracker:latest .
Run container: docker run --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all -v $(pwd)/weights:/MSES/weights -v $(pwd)/newData:/MSES/newData -it -p 8080:8080 -p 6006:6006 -p 8888:8888 morememes/emergency-tracker:latest
--runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all
- gpu visibility in the container.
-v localDir:containerDir
- mapping directories.
-p localPort:containerPort
- mapping network ports.
Use bash create_dirs.sh
for fast creating directories.
bash create_dirs.sh && docker build -t morememes/emergency-tracker:latest . && docker run --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all -v $(pwd)/weights:/MSES/weights -v $(pwd)/newData:/MSES/newData -it -p 8080:8080 -p 6006:6006 -p 8888:8888 morememes/emergency-tracker:latest
Any information that you may need to train placed also here as well as the way to use this software to transfer-learning
, resume training
etc.
detect.py
runs inference on any sources:
python3 detect.py --source ...
- Image:
--source file.jpg
- Video:
--source file.mp4
- Directory:
--source dir/
- Webcam:
--source 0
- RTSP stream:
--source rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa
- HTTP stream:
--source http://wmccpinetop.axiscam.net/mjpg/video.mjpg
To run a model with track objects you just need to add --track
:
YOLOv3: python3 detect.py --cfg cfg/yolov3.cfg --weights weights/best.pt --source newData/inference/ --track
Download from:
Weights
Dataset
Requrements: npm,angular
To run:
-
in root: python flask_app.py
-
in MSES-front:
2.1) npm i 2.2) ng serve
-
go to http://localhost:4200