-
Notifications
You must be signed in to change notification settings - Fork 44
Description
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?
Thanks in advance!