CCPD
CCPD copied to clipboard
Reimplementation for python 3.11 and PyTorch Lightning
Motivation
Hi everyone,
last year I used this repository (and dataset) extensively in one of my classes and ended up reimplementing most of the code to work with python 3.11 and PyTorch lightning. I primarily had issues with installing the right PyTorch version and getting the ROI pooling functionality to work.
What
I restructured the repository to some extent:
Networks
wR2.py→ is now calledDetectionModuleand resides insrc/modules/detection.pyrpnet.py→fh02is now calledRecognitionModuleand resides insrc/modules/recognition
Training
Pretraining and training are now handled by PyTorch lightning trainers in the following files:
src/pretrain.py→ now holds the logic for pretraining (i.e. training theDetectionModule)src/train.py→ now holds the logic for loading the pretrained weights of theDetectionModuleand training theRecognitionModule
→ both networks are re-implemented as LightningModule's (i.e., training, testing, and validation loops are handled in the network class
ROI Pooling
→ the logic for ROI pooling now resides in src/modules/utils.py
Miscellaneous
- rewrote the README.md to reflect the new setup and (pre-)training procedure
- Removed the
splitdirectory (I thought that it's not necessary to include it in the repo since it's contained in the dataset download)