Home

Awesome

YOLTv5

Alt text

YOLTv5 rapidly detects objects in arbitrarily large aerial or satellite images that far exceed the ~600×600 pixel size typically ingested by deep learning object detection frameworks.

YOLTv5 builds upon YOLT and SIMRDWN, and updates these frameworks to use the YOLOv5 version of the YOLO object detection family. This repository has generally similar performance to the Darknet-based YOLTv4 repository. For those users who prefer a PyTorch backend, however, we provide YOLTv5.

Below, we provide examples of how to use this repository with the open-source SpaceNet dataset.


Running YOLTv5


0. Installation (Preliminary)

YOLTv5 is built to execute on a GPU-enabled machine.

cd yoltv5/yolov5
pip install -r requirements.txt 

# update with geo packages
conda install -c conda-forge gdal
conda install -c conda-forge osmnx=0.12 
conda install  -c conda-forge scikit-image
conda install  -c conda-forge statsmodels
pip install torchsummary
pip install utm
pip install numba
pip install jinja2==2.10

1. Train

Training preparation is accomplished via prep_train.py. To train a model, run:

cd /yoltv5
python yolov5/train.py --img 640 --batch 16 --epochs 100 --data yoltv5_train_vehicles_8cat.yaml --weights yolov5l.pt

2. Test

Simply edit yoltv5_test_vehicles_8cat.yaml to point to the appropriate locations, then run the test.sh script:

cd yoltv5
./test.sh ../configs/yoltv5_test_vehicles_8cat.yaml

Outputs will look something like the figure below (cars=green, trucks=red, buses=blue):

Alt text