Use of Retinanet for cityscapes - Project DLAV 2023
Download the Cityscapes Dataset and organize the files in the following structure. Create an empty annotations
directory. The conversion_seg_to_bbox has to contain the following (the Cityscape dataset gtFine and leftImg8bit can be obtain online by downloading a zip):
data/
└── cityscapes
├── annotations
├── gtFine
│ ├── test
│ ├── train
│ └── val
└── leftImg8bit
├── test
├── train
└── val
main.py
inspect_coco.py
requirements1.txt
You should run the code provided from a iypnb create in the same repo as Retinanet see below (here called main.ipynb)
Retinanet/
README.md
main.iypnb
!pip install -r Retinanet/conv/requirements1.txt
To run the conversion execute the following
!python Retinanet/conv/main.py --datadir Retinanet/conv/data/cityscapes --outdir Retinanet/conv/data/cityscapes/annotations
In order to run the visualization of the Cityscapes dataset with boxes you may run
!python Retinanet/conv/vizubbox.py
!pip install -r Retinanet/requirements2.txt
To run the model execute (you might have to uncomment the model)
!python Retinanet/main_model.py
In order to run the visualization of Cityscapes prediction please launch run the command:
!python Retinanet/vizualization.py
note: Due to computation issues the weights that are used have been computed on the initial dateset