liuhengyue / fcsgg

A PyTorch implementation for the paper: Fully Convolutional Scene Graph Generation, CVPR 2021
MIT License
28 stars 2 forks source link

How to use the pre-trained model to run the work successfully? #8

Closed LeonLee8Hang closed 2 years ago

LeonLee8Hang commented 2 years ago

Hi, I downloaded the pre-trained model as mentioned and run the command as below:

python tools/train_net.py --eval-only --config-file configs/eval/FCSGG-Res50-BiFPN-P2P5-MultiscaleHead-MS.yaml MODEL.WEIGHTS "output/ResNet50-4S-FPN-2.pth"

The exception will happen as below. I tried the other two models: HRNetW32-1S.pth and HRNetW48-5S-FPN-2.pth, unfortunately, none of them run successfully.

[08/12 12:44:27 fvcore.common.checkpoint]: [Checkpointer] Loading from output/ResNet50-4S-FPN-2.pth ... Traceback (most recent call last): File "tools/train_net.py", line 160, in args=(args,), File "d:\dataset\src\detectron2\detectron2\engine\launch.py", line 62, in launch main_func(*args) File "tools/train_net.py", line 130, in main res = Trainer.test(cfg, model) File "d:\dataset\src\detectron2\detectron2\engine\defaults.py", line 512, in test data_loader = cls.build_test_loader(cfg, dataset_name) File "tools/train_net.py", line 58, in build_test_loader return build_detection_test_loader(cfg, dataset_name, mapper=DatasetMapper(cfg, False)) File "d:\dataset\src\detectron2\detectron2\data\build.py", line 382, in build_detection_test_loader else None, File "d:\dataset\src\detectron2\detectron2\data\build.py", line 219, in get_detection_dataset_dicts dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in dataset_names] File "d:\dataset\src\detectron2\detectron2\data\build.py", line 219, in dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in dataset_names] File "d:\dataset\src\detectron2\detectron2\data\catalog.py", line 58, in get return f() File "D:\code\newton\workspace\pytorchPro\VisionFormer\stgraph\SceneGraph\fcsgg\fcsgg\data\datasets\visual_genome.py", line 491, in filter_non_overlap=False)) File "D:\code\newton\workspace\pytorchPro\VisionFormer\stgraph\SceneGraph\fcsgg\fcsgg\data\datasets\visual_genome.py", line 401, in get_dicts filenames = [self.all_filenames[i] for i in np.where(split_mask)[0]] File "D:\code\newton\workspace\pytorchPro\VisionFormer\stgraph\SceneGraph\fcsgg\fcsgg\data\datasets\visual_genome.py", line 401, in filenames = [self.all_filenames[i] for i in np.where(split_mask)[0]] IndexError: list index out of range

LeonLee8Hang commented 2 years ago

Thanks