DirtyHarryLYL/HAKE-Action-Torch

Where to replace the dataset in the test phase?

quan1e opened this issue · 5 comments

Hi authors:
I am running the command:
python -u tools/test_net.py --cfg configs/a2v/verb.yaml
TEST.WEIGHT_PATH checkpoints/a2v/pretrained_model.pth
GPU_ID 0
Finally, i got the results:
[INFO] test: verb-157: 9.22, 9.22
[INFO] test: verb-117: 12.23, 12.25

  1. I konw that, verb-157 means NUM_VERBS: 157, while what dose verb-117 mean, where is it from?
    And, what do the four numbers 9.22, 9.22, 12.23, 12.25 mean?
  2. I noticed, the test set contains 9987 images with the default setting, it seems to be a combination of the data listed as "hico_test"(9658) and "collect"(329) in data_path.json, and how to set my own dataset? I cannot find target codes in test_net.py and config.py.

Thanks for your codes and contribution. Best wishes.

BTW, in my understanding, gt_verb_data.pkl stores the gt verb labels of each image. But i cannot find how do u use it in your test code. Could u please give some explanations?
Sorry to bother you for my problems.

hwfan commented

verb-117 and verb-157 are the two settings of HAKE test set. Actually, the verb classes of HAKE include 117 classes (with the key "hico_test" in our dataloader) from HICO and 40 manually selected classes by ourselves (with the key "collect" in our dataloader). The shown four numbers are the average AP of these classes. For the details, please refer to MODEL.md.
The gt file gt_verb_data.pkl is used in the benchmark stage, please refer to benchmark.py. To use your own dataset, please follow hake_dataset.py which gives an interface for the dataset used for training and testing.

Thanks for your kindly reply. Your answer solves most of my doubts.

  1. I still wonder where is the code that specifies the "hico_test"and "collect" datasets. I trace the codes about test_loader(test_net.py L101), and find code,
    config.py: L62, __C.DATA.IMAGE_FOLDER_LIST = osp.join(__C.DATA.DATA_DIR, 'metadata', 'data_path.json'),
    but, there are not only the two above datasets in the file.
  2. What is stored in the 'Test_pred_rcnn' and is it used for specifying the "hico_test"and "collect" datasets?
    hake_dataset.py: L252, self.db = lmdb.open(self.cfg.DATA.PRED_DB_PATH)
    config.py: L62, __C.DATA.PRED_DB_PATH = osp.join(__C.DATA.DATA_DIR, 'Test_pred_rcnn')

Sorry to trouble you.

hwfan commented

It should be noted that the HAKE dataset includes images from several dataset splits, please refer to the data instruction of HAKE. In the label set we provided(compressed with lmdb, see the download instruction), these splits are identified by the keys of database(see L103-110 of hake_dataset.py), and then used to load images in the corresponding image directories. You can trace the program until it comes to the __getitem__ method for the details.

Test_pred_rcnn provides the human boxes detected by the pretrained Faster-RCNN. It is predicted on the test split of HAKE dataset, including "hico_test" and part of the "collect" data.

^.^ .Thank you for your detailed answer. Now I have a deeper understanding of your code. I would learn more about the code.