Skip to content

Large discrepancy between test results and ground truth on CAMO dataset #13

@MarkonH

Description

@MarkonH

Hi,

Thank you for sharing your code. I trained and tested the model using the CAMO dataset, following the exact settings mentioned in your paper (AdamW optimizer, initial learning rate of 0.001, 352 × 352 resolution, batch size of 12, and 50 training epochs). The only modification I made was to test.py to output 0/255.
`for i in range(test_loader.size):
with torch.no_grad():
image, gt, name = test_loader.load_data()
gt = np.asarray(gt, np.float32)
image = image.to(device)
res, _, _ = model(image)
res = torch.sigmoid(res)
res = F.upsample(res, size=gt.shape, mode='bilinear', align_corners=False)
res = res.data.cpu().numpy().squeeze()

    threshold = 0.5
    res = 255 * (res > threshold).astype(np.uint8)
    
    print("Saving " + name)
    imageio.imsave(os.path.join(args.save_path, name[:-4] + ".png"), res)`

However, I noticed that the test results show a significant discrepancy compared to the ground truth. Could you please clarify if there are any additional steps or special processing that I might be missing?
截屏2024-09-13 下午8 07 00
截屏2024-09-13 下午8 08 06

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions