pytorch >= 0.4
visdom
CUDA >= 8.0
PA-100K dataset
|--Hydraplus
|----data
|------PA-100K
|--------annotation
|--------ralease_data
|----------release_data
As the paper said:
We train the HP-net in a stage-wise fashion. Initially,a plain M-net is trained to learn the fundamental pedestrian features.
- We can get fundamental pedestrian features and save the checkpoint via :
python train.py -m MNet
Then the M-net is duplicated three times to construct the AF-net with adjacent MDA modules
- To get AF-net checkpoint:
python train.py -m AF1 -mpath MNet/checkpoint_epoch_60
python train.py -m AF2 -mpath MNet/checkpoint_epoch_60
python train.py -m AF3 -mpath MNet/checkpoint_epoch_60
Since each MDA module consists of three branches where the attention map masks adjacent inception blocks, thus in each branch we only fine-tune the blocks after the attention-operated block.
python train.py -m AF1 -p AF1/checkpoint_epoch_0
python train.py -m AF2 -p AF2/checkpoint_epoch_0
python train.py -m AF3 -p AF3/checkpoint_epoch_0
After separately fine-tuning three MDA modules in AF-net, we fix both the M-net and AF-net and train the remaining GAP and FC layers.
python train.py -m HP -mpath MNet/checkpoint_epoch_60 -af1path AF1/checkpoint_epoch_0 -af2path AF2/checkpoint_epoch_0 -af3path AF3/checkpoint_epoch_0
python test.py -m {AF1|AF2|AF3|HP|MNet} -p checkpointpath
python test.py -m AF1 -p AF1/checkpoint_epoch_0
python test.py -m AF2 -p AF2/checkpoint_epoch_0
python test.py -m AF3 -p AF3/checkpoint_epoch_0
python test.py -m MNet -p MNet/checkpoint_epoch_0
python test.py -m HP -p HP/checkpoint_epoch_0
python show.py -m {AF1|AF2|AF3|HP|MNet} -p checkpointpath
python show.py -m AF1 -p AF1/checkpoint_epoch_0
python show.py -m AF2 -p AF2/checkpoint_epoch_0
python show.py -m AF3 -p AF3/checkpoint_epoch_0
python show.py -m MNet -p MNet/checkpoint_epoch_0
python show.py -m HP -p HP/checkpoint_epoch_0