BGNet icon indicating copy to clipboard operation
BGNet copied to clipboard

When I test I get the following error

Open dante1024 opened this issue 3 years ago • 6 comments

When I test I get the following error:

Traceback (most recent call last): File "etest.py", line 30, in image, gt, name = test_loader.load_data() File "/data/zjb/camo/BGNet-master/utils/tdataloader.py", line 113, in load_data gt = self.binary_loader(self.gts[self.index]) IndexError: list index out of range

What's wrong with this error?

dante1024 avatar Sep 01 '22 00:09 dante1024

When I test I get the following error:

Traceback (most recent call last): File "etest.py", line 30, in image, gt, name = test_loader.load_data() File "/data/zjb/camo/BGNet-master/utils/tdataloader.py", line 113, in load_data gt = self.binary_loader(self.gts[self.index]) IndexError: list index out of range

What's wrong with this error?

Maybe the dataset link is wrong, but I can't confirm it now. I'll reply to you again after handling it.

thograce avatar Sep 01 '22 02:09 thograce

When I test I get the following error: Traceback (most recent call last): File "etest.py", line 30, in image, gt, name = test_loader.load_data() File "/data/zjb/camo/BGNet-master/utils/tdataloader.py", line 113, in load_data gt = self.binary_loader(self.gts[self.index]) IndexError: list index out of range What's wrong with this error?

Maybe the dataset link is wrong, but I can't confirm it now. I'll reply to you again after handling it.

I have solved it, in tdataloader.py line 98 self.gts = [gt_root + f for f in os.listdir(gt_root) if f.endswith('.jpg')] should be changed to self.gts = [gt_root + f for f in os.listdir(gt_root) if f.endswith('.png')] , GT is a png image, so when loading GT here, it should be in png format

dante1024 avatar Sep 01 '22 02:09 dante1024

When I test I get the following error: Traceback (most recent call last): File "etest.py", line 30, in image, gt, name = test_loader.load_data() File "/data/zjb/camo/BGNet-master/utils/tdataloader.py", line 113, in load_data gt = self.binary_loader(self.gts[self.index]) IndexError: list index out of range What's wrong with this error?

Maybe the dataset link is wrong, but I can't confirm it now. I'll reply to you again after handling it.

I have solved it, in tdataloader.py line 98 self.gts = [gt_root + f for f in os.listdir(gt_root) if f.endswith('.jpg')] should be changed to self.gts = [gt_root + f for f in os.listdir(gt_root) if f.endswith('.png')] , GT is a png image, so when loading GT here, it should be in png format

Yes, you're right. I'll correct it.

thograce avatar Sep 01 '22 02:09 thograce

When I test I get the following error: Traceback (most recent call last): File "etest.py", line 30, in image, gt, name = test_loader.load_data() File "/data/zjb/camo/BGNet-master/utils/tdataloader.py", line 113, in load_data gt = self.binary_loader(self.gts[self.index]) IndexError: list index out of range What's wrong with this error?

Maybe the dataset link is wrong, but I can't confirm it now. I'll reply to you again after handling it.

I have solved it, in tdataloader.py line 98 self.gts = [gt_root + f for f in os.listdir(gt_root) if f.endswith('.jpg')] should be changed to self.gts = [gt_root + f for f in os.listdir(gt_root) if f.endswith('.png')] , GT is a png image, so when loading GT here, it should be in png format

Yes, you're right. I'll correct it.

By the way, does batchsize have a big impact on the results? The batchsize used in the original paper is 16, and the batchsize I use is 2. The test indicators of the model I trained are very different from the original paper.

dante1024 avatar Sep 01 '22 02:09 dante1024

When I test I get the following error: Traceback (most recent call last): File "etest.py", line 30, in image, gt, name = test_loader.load_data() File "/data/zjb/camo/BGNet-master/utils/tdataloader.py", line 113, in load_data gt = self.binary_loader(self.gts[self.index]) IndexError: list index out of range What's wrong with this error?

Maybe the dataset link is wrong, but I can't confirm it now. I'll reply to you again after handling it.

I have solved it, in tdataloader.py line 98 self.gts = [gt_root + f for f in os.listdir(gt_root) if f.endswith('.jpg')] should be changed to self.gts = [gt_root + f for f in os.listdir(gt_root) if f.endswith('.png')] , GT is a png image, so when loading GT here, it should be in png format

Yes, you're right. I'll correct it.

By the way, does batchsize have a big impact on the results? The batchsize used in the original paper is 16, and the batchsize I use is 2. The test indicators of the model I trained are very different from the original paper.

If you only modify the batchsize without adjusting the learning rate, you will definitely not get similar results.

thograce avatar Sep 01 '22 02:09 thograce

When I test I get the following error: Traceback (most recent call last): File "etest.py", line 30, in image, gt, name = test_loader.load_data() File "/data/zjb/camo/BGNet-master/utils/tdataloader.py", line 113, in load_data gt = self.binary_loader(self.gts[self.index]) IndexError: list index out of range What's wrong with this error?

Maybe the dataset link is wrong, but I can't confirm it now. I'll reply to you again after handling it.

I have solved it, in tdataloader.py line 98 self.gts = [gt_root + f for f in os.listdir(gt_root) if f.endswith('.jpg')] should be changed to self.gts = [gt_root + f for f in os.listdir(gt_root) if f.endswith('.png')] , GT is a png image, so when loading GT here, it should be in png format

Yes, you're right. I'll correct it.

By the way, does batchsize have a big impact on the results? The batchsize used in the original paper is 16, and the batchsize I use is 2. The test indicators of the model I trained are very different from the original paper.

If you only modify the batchsize without adjusting the learning rate, you will definitely not get similar results.

batchsize: 2, lr: 1.25e-5 or 1.5e-5. You can try this setting.

thograce avatar Sep 01 '22 03:09 thograce