Home

Awesome

SOV-STG

Focusing on what to decode and what to train: Efficient Training with HOI Split Decoders and Specific Target Guided DeNoising (paper)

<img src="img/SOV-STG.jpg" width="800"/>

Requirements

pip install -r requirements.txt
cd ./models/ops/deformable_transformer_attention/
sh ./make.sh
# test
python test.py

Dataset Preparation

HICO-DET

Please follow the HICO-DET dataset preparation of GGNet. See the README.md of QAHOI.

After preparation, the data/hico_det folder as follows:

data
├── hico_det
|   ├── images
|   |   ├── test2015
|   |   └── train2015
|   └── annotations
|       ├── anno_list.json
|       ├── corre_hico.npy
|       ├── file_name_to_obj_cat.json
|       ├── hoi_id_to_num.json
|       ├── hoi_list_new.json
|       ├── test_hico.json
|       └── trainval_hico.json
|       

V-COCO

Please follow the installation of V-COCO.

For evaluation, please put vcoco_test.ids and vcoco_test.json into data/v-coco/data folder.

After preparation, the data/v-coco folder as follows:

data
├── v-coco
|   ├── prior.pickle
|   ├── images
|   |   ├── train2014
|   |   └── val2014
|   ├── data
|   |   ├── instances_vcoco_all_2014.json
|   |   ├── vcoco_test.ids
|   |   └── vcoco_test.json
|   └── annotations
|       ├── corre_vcoco.npy
|       ├── test_vcoco.json
|       └── trainval_vcoco.json

Evaluation

Download the model to params folder.

HICO-DET

ModelFull (def)Rare (def)None-Rare (def)Full (ko)Rare (ko)None-Rare (ko)ckpt
SOV-STG-S33.8029.2835.1536.2230.9937.78checkpoint
SOV-STG-Swin-L (scratch)40.4939.4740.8042.5641.2442.95checkpoint
SOV-STG-Swin-L43.3542.2543.6945.5343.6246.11checkpoint

V-COCO

ModelAP (S1)AP (S2)ckpt
SOV-STG-L63.965.4checkpoint

Evaluating the model by running the following command.

# SOV-STG-S (HICO-DET)
sh configs/sov-stg-s_eval.sh

# SOV-STG-Swin-L_scratch (HICO-DET)
sh configs/sov-stg-swin-l_scratch_eval.sh

# SOV-STG-Swin-L (HICO-DET)
sh configs/sov-stg-swin-l_eval.sh

# SOV-STG-L (V-COCO)
sh configs/vcoco_sov-stg-l_eval.sh

Training

HICO-DET

Download our pre-trained DN-Deformable-DETR swin-Large model from Google Drive to params folder.

# paramter convert (optional)
python convert_parameters.py \
    --load_path params/dn_dab_deformable_detr_swin_large.pth \
    --save_path params/sov-stg-swin-l_hico.pth

# train from scratch
sh configs/sov-stg-swin-l_scratch.sh

# train from pre-trained DN-Deformable-DETR Swin-Large
sh configs/sov-stg-swin-l.sh

Download the official pre-trained DN-Deformable-DETR R50 model from Google Drive or BaiDu to params folder.

# paramter convert (optional)
python convert_parameters.py \
    --save_path params/sov-stg-s_hico.pth

sh configs/sov-stg-s.sh

V-COCO

Download our pre-trained DN-Deformable-DETR R101 model from Google Drive to params folder.

# paramter convert (optional)
python convert_parameters.py \
    --dataset vcoco \
    --dec_n_points 4 \
    --load_path params/dn_dab_deformable_detr_r101.pth \
    --save_path params/sov-stg-l_vcoco.pth

# train
sh configs/vcoco_sov-stg-l.sh

Citation

@article{chen2023focusing,
  title={Focusing on what to decode and what to train: Efficient Training with HOI Split Decoders and Specific Target Guided DeNoising},
  author={Chen, Junwen and Wang, Yingcheng and Yanai, Keiji},
  journal={arXiv preprint arXiv:2307.02291},
  year={2023}
}