This repository contains the code for the MAFF-HRNet project from this paper. At present, the program status is version 1.0, which will be further updated and improved in the future.
It is worth noting that python 3.7 and torch 1.8 are recommended.
conda create -n MAFF python=3.7
conda activate MAFF
pip install -r requirements.txt
├──VOC2007
├──ImageSets
│ ├──Segmentation
│ │ ├── train.txt
│ │ ├── val.txt
├──SegmentationClass
│ ├── *.png
└──JPEGImages
└── *.jpg
You may modify preprocessing.py to adapt code to cut your image.
python preprocessing.py
The train.txt and val.txt generated by make_list.py contain a list of image names without suffix, for example:
frame_0
frame_1
frame_2
frame_3
frame_4
frame_5
frame_6
frame_7
frame_8
...
-
Training with Multi-GPU.
set distributed = True
python -m torch.distributed.launch --nproc_per_node=num_gpu train.py
- Training with single GPU.
python train.py
python predict.py