nn.py
: Defines the L2CS neural network architecture.util.py
: Contains utility functions and classes.datasets.py
: Handles data loading, preprocessing, and augmentation.main.py
: The main executable script that sets up the model, performs training,testing, and inference.
conda create -n PyTorch python=3.9
conda activate PyTorch
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
pip install opencv-python==4.5.5.64
pip install scipy
pip install tqdm
pip install timm
- Configure your dataset path in
main.py
for training - Run
python main.py --train
for Single-GPU training - Run
bash main.sh $ --train
for Multi-GPU training,$
is number of GPUs
- Configure your dataset path in
main.py
for testing - Run
python main.py --test
for testing
- Configure your video path in
main.py
for visualizing the demo - Run
python main.py --demo
for demo
Backbone | Epochs | MAE | Model |
---|---|---|---|
ResNet18 | 180 | 10.6 | weight |
ResNet18* | 180 | 11.2 |
*
means that the results are from original repo, see reference