KaihuaTang / Scene-Graph-Benchmark.pytorch

A new codebase for popular Scene Graph Generation methods (2020). Visualization & Scene Graph Extraction on custom images/datasets are provided. It's also a PyTorch implementation of paper “Unbiased Scene Graph Generation from Biased Training CVPR 2020”
MIT License
1.03k stars 228 forks source link

IndexError: list index out of range #67

Open Ankit-Vohra opened 3 years ago

Ankit-Vohra commented 3 years ago

❓ Questions and Help

I am facing this error while implementing SGGDet on custom images. Can you please help me with this?

File "/home/dell-7559/Scene-Graph-Benchmark.pytorch/maskrcnn_benchmark/data/datasets/visual_genome.py", line 63, in self.filenames = [self.filenames[i] for i in np.where(self.split_mask)[0]] IndexError: list index out of range

KaihuaTang commented 3 years ago

I've just fixed this bug. You can directly comment out lines 52-64 in this file (visual_genome.py) to solve the issue.

ajeetksingh commented 3 years ago

Hi Kai,

Thanks for the reply. I was also trying to debug the aforementioned issue.

I just wanted to know if we ever need to uncomment these lines while we finetune/train from scratch the model?

liuhl-source commented 3 years ago

❓ Questions and Help

I am facing this error while implementing SGGDet on custom images. Can you please help me with this?

File "/home/dell-7559/Scene-Graph-Benchmark.pytorch/maskrcnn_benchmark/data/datasets/visual_genome.py", line 63, in self.filenames = [self.filenames[i] for i in np.where(self.split_mask)[0]] IndexError: list index out of range

Hi, have you fixed this bug? #69

KaihuaTang commented 3 years ago

My recent commit should fix the problem. https://github.com/KaihuaTang/Scene-Graph-Benchmark.pytorch/commit/81714a337ada463f428b2d0a1521730c5c597571

YvonneZhao0305 commented 3 years ago

My recent commit should fix the problem. 81714a3

Hi, I met the same problem, and I used the newest commit 1b955c6

File "/home/xxx/Project/Scene-Graph-Benchmark.pytorch/maskrcnn_benchmark/data/datasets/visual_genome.py", line 66, in self.filenames = [self.filenames[i] for i in np.where(self.split_mask)[0]] IndexError: list index out of range

Sunting78 commented 3 years ago

My recent commit should fix the problem. 81714a3

Hi, I met the same problem, and I used the newest commit 1b955c6

File "/home/xxx/Project/Scene-Graph-Benchmark.pytorch/maskrcnn_benchmark/data/datasets/visual_genome.py", line 66, in self.filenames = [self.filenames[i] for i in np.where(self.split_mask)[0]] IndexError: list index out of range

Me too. Have you already soloved?

winnechan commented 2 years ago

The new commint https://github.com/KaihuaTang/Scene-Graph-Benchmark.pytorch/commit/81714a337ada463f428b2d0a1521730c5c597571 does not resolve the problem for me? It seems that somewhere before the line 'data_loaders_val = make_data_loader(cfg, mode="test", is_distributed=distributed)' in tools/relation_test_net.py another dataloader of 'custom_eval False split train' is created.