HOI-CL icon indicating copy to clipboard operation
HOI-CL copied to clipboard

How to train with custom data

Open Zhanyi0923 opened this issue 3 years ago • 2 comments

Hi,thank u for ur great work! I'm working on the HOI detection recently.I want to make my own dataset as the form of HICO-DET. Do u know how to annotate the dataset or what tools should I use ?
Thanks again!

Zhanyi0923 avatar Dec 28 '21 14:12 Zhanyi0923

Do you mean how to annotate your own dataset? I refer to this paper (https://arxiv.org/abs/1702.05448) which describes the annotation of HICO-DET.

If you want to train your own dataset with HOI-CL, you should provide the annotation with a similar format as "Trainval_GT_HICO.pkl". The file can be downloaded as follow,

python lib/ult/Download_data.py 1le4aziSn_96cN3dIPCYyNsBXJVDD8-CZ Data/Trainval_GT_HICO.pkl

Trainval_GT_HICO.pkl is a list. each item represents an annotation: <image_id, HOI_category, human_box, object_box, ...> We do not use the other number. You might also provide a Tranval_Neg_HICO.pkl for not annotated negative samples (i.e., no interaction).

Then, you should change the directory in ult.py, e.g. hico_20160224_det/images/train2015/HICO_train2015_ to your own image directory.

zhihou7 avatar Dec 28 '21 15:12 zhihou7

Thanks a lot

At 2021-12-28 23:33:58, "zhihou7" @.***> wrote:

Do you mean how to annotate your own dataset? I refer to this paper (https://arxiv.org/abs/1702.05448) which describes the annotation of HICO-DET.

If you want to train your own dataset with HOI-CL, you should provide the annotation with a similar format as "Trainval_GT_HICO.pkl". The file can be downloaded as follow,

python lib/ult/Download_data.py 1le4aziSn_96cN3dIPCYyNsBXJVDD8-CZ Data/Trainval_GT_HICO.pkl

Trainval_GT_HICO.pkl is a list. each item represents an annotation: <image_id, HOI_category, human_box, object_box, ...> We do not use the other number. You might also provide a Tranval_Neg_HICO.pkl for not annotated negative samples (i.e., no interaction).

Then, you should change the directory in ult.py, e.g. hico_20160224_det/images/train2015/HICO_train2015_ to your own image directory.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

Zhanyi0923 avatar Dec 29 '21 01:12 Zhanyi0923