Open PlutoXN opened 2 weeks ago
May I ask what caused this problem? The configuration file is shown: --config', default="configs\VG150\e2e_relation_X_101_32_8_FPN_1x.yaml" --weights', default="checkpoints\0028000.pth" --classes', default="datasets\vg\VG-SGG-dicts-with-attri.json" The model is obtained from the provided download path
D:\anaconda3\envs\sg\python.exe E:\Projects\SGG-Benchmark-main\demo\webcam_demo.py 2024-10-28 18:25:51.970 | INFO | sgg_benchmark.utils.logger:setup_logger:31 - Using loguru logger with level: INFO E:/home/maelic/Documents/Datasets/VG/VG_100K E:/Projects/SGG-Benchmark-main/datasets/vg/image_data.json Traceback (most recent call last): File "E:\Projects\SGG-Benchmark-main\demo\webcam_demo.py", line 66, in main(args) File "E:\Projects\SGG-Benchmark-main\demo\webcam_demo.py", line 19, in main model = SGG_Model(config_path, dict_file, weights, tracking=tracking, rel_conf=rel_conf, box_conf=box_conf) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Projects\SGG-Benchmark-main\demo\demo_model.py", line 61, in init self.load_model() File "E:\Projects\SGG-Benchmark-main\demo\demo_model.py", line 66, in load_model self.model = build_detection_model(self.cfg) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\modeling\detector\detectors.py", line 12, in build_detection_model return meta_arch(cfg) ^^^^^^^^^^^^^^ File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\modeling\detector\generalized_rcnn.py", line 31, in init self.roi_heads = build_roi_heads(cfg, self.backbone.out_channels) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\modeling\roi_heads\roi_heads.py", line 69, in build_roi_heads roi_heads.append(("relation", build_roi_relation_head(cfg, in_channels))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\modeling\roi_heads\relation_head\relation_head.py", line 131, in build_roi_relation_head return ROIRelationHead(cfg, in_channels) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\modeling\roi_heads\relation_head\relation_head.py", line 39, in init self.predictor = make_roi_relation_predictor(cfg, feat_dim) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\modeling\roi_heads\relation_head\roi_relation_predictors.py", line 11, in make_roi_relation_predictor return func(cfg, in_channels) ^^^^^^^^^^^^^^^^^^^^^^ File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\modeling\roi_heads\relation_head\predictors\regularized_predictors.py", line 142, in init super().init(config, in_channels) File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\modeling\roi_heads\relation_head\predictors\default_predictors.py", line 32, in init self.statistics = get_dataset_statistics(self.cfg) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\data\build.py", line 54, in get_dataset_statistics statistics.append(dataset.get_statistics()) ^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\data\datasets\visual_genome.py", line 135, in get_statistics fg_matrix, bg_matrix, predicate_new_order, predicate_new_order_count, pred_freq, triplet_freq, pred_weight = get_VG_statistics(img_dir=self.img_dir, roidb_file=self.roidb_file, dict_file=self.dict_file, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\data\datasets\visual_genome.py", line 280, in get_VG_statistics train_data = VGDataset(split='train', img_dir=img_dir, roidb_file=roidb_file, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\data\datasets\visual_genome.py", line 80, in init self.filenames = [self.filenames[i] for i in np.where(self.split_mask)[0]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\data\datasets\visual_genome.py", line 80, in self.filenames = [self.filenames[i] for i in np.where(self.split_mask)[0]]
~~~~~~^^^ IndexError: list index out of range [] Length of split_mask: 108073 Length of filenames: 0
I've encountered a similar problem, the reason is that the dataset path is not configured properly in the configuration file, you can check the corresponding configuration file patas_catalog.py and .yaml file
May I ask what caused this problem? The configuration file is shown: --config', default="configs\VG150\e2e_relation_X_101_32_8_FPN_1x.yaml" --weights', default="checkpoints\0028000.pth" --classes', default="datasets\vg\VG-SGG-dicts-with-attri.json" The model is obtained from the provided download path
D:\anaconda3\envs\sg\python.exe E:\Projects\SGG-Benchmark-main\demo\webcam_demo.py 2024-10-28 18:25:51.970 | INFO | sgg_benchmark.utils.logger:setup_logger:31 - Using loguru logger with level: INFO E:/home/maelic/Documents/Datasets/VG/VG_100K E:/Projects/SGG-Benchmark-main/datasets/vg/image_data.json Traceback (most recent call last): File "E:\Projects\SGG-Benchmark-main\demo\webcam_demo.py", line 66, in
main(args)
File "E:\Projects\SGG-Benchmark-main\demo\webcam_demo.py", line 19, in main
model = SGG_Model(config_path, dict_file, weights, tracking=tracking, rel_conf=rel_conf, box_conf=box_conf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Projects\SGG-Benchmark-main\demo\demo_model.py", line 61, in init
self.load_model()
File "E:\Projects\SGG-Benchmark-main\demo\demo_model.py", line 66, in load_model
self.model = build_detection_model(self.cfg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\modeling\detector\detectors.py", line 12, in build_detection_model
return meta_arch(cfg)
^^^^^^^^^^^^^^
File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\modeling\detector\generalized_rcnn.py", line 31, in init
self.roi_heads = build_roi_heads(cfg, self.backbone.out_channels)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\modeling\roi_heads\roi_heads.py", line 69, in build_roi_heads
roi_heads.append(("relation", build_roi_relation_head(cfg, in_channels)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\modeling\roi_heads\relation_head\relation_head.py", line 131, in build_roi_relation_head
return ROIRelationHead(cfg, in_channels)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\modeling\roi_heads\relation_head\relation_head.py", line 39, in init
self.predictor = make_roi_relation_predictor(cfg, feat_dim)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\modeling\roi_heads\relation_head\roi_relation_predictors.py", line 11, in make_roi_relation_predictor
return func(cfg, in_channels)
^^^^^^^^^^^^^^^^^^^^^^
File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\modeling\roi_heads\relation_head\predictors\regularized_predictors.py", line 142, in init
super().init(config, in_channels)
File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\modeling\roi_heads\relation_head\predictors\default_predictors.py", line 32, in init
self.statistics = get_dataset_statistics(self.cfg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\data\build.py", line 54, in get_dataset_statistics
statistics.append(dataset.get_statistics())
^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\data\datasets\visual_genome.py", line 135, in get_statistics
fg_matrix, bg_matrix, predicate_new_order, predicate_new_order_count, pred_freq, triplet_freq, pred_weight = get_VG_statistics(img_dir=self.img_dir, roidb_file=self.roidb_file, dict_file=self.dict_file,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\data\datasets\visual_genome.py", line 280, in get_VG_statistics
train_data = VGDataset(split='train', img_dir=img_dir, roidb_file=roidb_file,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\data\datasets\visual_genome.py", line 80, in init
self.filenames = [self.filenames[i] for i in np.where(self.split_mask)[0]]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Projects\SGG-Benchmark-main\sgg_benchmark\data\datasets\visual_genome.py", line 80, in
self.filenames = [self.filenames[i] for i in np.where(self.split_mask)[0]]