Reimplementation for python 3.11 and PyTorch Lightning #105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 calledDetectionModule
and resides insrc/modules/detection.py
rpnet.py
→fh02
is now calledRecognitionModule
and 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 theDetectionModule
and training theRecognitionModule
→ both networks are re-implemented as
LightningModule
's (i.e., training, testing, and validation loops are handled in the network classROI Pooling
→ the logic for ROI pooling now resides in
src/modules/utils.py
Miscellaneous
split
directory (I thought that it's not necessary to include it in the repo since it's contained in the dataset download)