This project builds upon and adapts code from the following official repositories:
- DenseASPP: DeepMotionAIResearch/DenseASPP
- DeepLabV3+: VainF/DeepLabV3Plus-Pytorch
The original architectures have been modernized and adapted to handle custom modern datasets, including weighted sampling and dynamic 512x512 random cropping during transfer learning.
All the modifications can be found on this project repository
- if you run on GPU, you can put INFERENCE_IMG_AMOUNT up to SUBSET_SAMPLE_AMOUNT (usually 152), otherwise it is suggested to use the value 3
- parameters are in the end of the first code cell in the beginning of the project
Mapillary Vitas is a very heavy dataset (>20GiB): download and extraction can take up to 20 minutes. For a minimal run, instead of running all the Colab:
- in "Imports and constants", set SubsetToggles hf_download field to True and everything else to False (default)
- run "Imports and constants"
- run "Datasets/Common utility functions"
- run "Datasets/Mapillary Vistas/Subset utility"
- run "Datasets/Indian Driving Dataset/Subset utility"
- run "Model initializations and 0-shot inference/Common utility functions"
- run "Model initializations and 0-shot inference/Dense ASPP"
- run "Model initializations and 0-shot inference/Deeplab v3+"
- run "Transfer learning/Common utility functions"
- run "Transfer learning/Weights utility"
- run "Final results and conclusions"
It is otherwise possible to download the full datasets and then generate the subset by putting "create" in SubsetToggles true, and "hf_download" false. Subset will be dynamically created. In this case, all the sections of Mapillary Vistas and IDD must be run (it will take a lot of time for the download).
It is possible to see the transfer learning process by not loading the saved weights from Hugging Face, and just run the DenseASPP and DeepLab V3+ sections in Transfer learning without running Weights utility.