idisc icon indicating copy to clipboard operation
idisc copied to clipboard

About the results of my own test picture are inconsistent with the paper

Open QGLab opened this issue 2 years ago • 5 comments

Hello, Based on the original function, I added the function of outputting a color depth map to the project code. However, in the kitti data set, using the same picture (from the first row of Figure 13 in the original paper), whether using resnet101, effnetb5 or swint to swinl, I cannot get as good an effect as shown in Figure 13 of the paper. The following three pictures are, in order, the test effect I used resnet101, the test effect I used swinl and the original paper effect. Apart from that, the main part of my test code is as follows

img = Image.open(
        ".\\2011_09_26\\2011_09_26_drive_0002_sync\\image_02\\data\\0000000021.png")
    transform = trasforms.Compose([trasforms.ToTensor(), trasforms.Normalize(mean=[0.485, 0.456, 0.406],
                                                                             std=[0.229, 0.224, 0.225])])
    img = transform(img).unsqueeze(0)
    model.eval()
    with torch.no_grad():
        preds, losses, _ = model(img.to(device), None, None)
    preds = preds.cpu().numpy()[0, 0, :, :]
    img = visulization.colorize(preds)
    img = Image.fromarray(img, mode='RGB')
    min_val = np.min(preds)
    max_val = np.max(preds)
    scaled_array = (preds - min_val) / (max_val - min_val)
    preds = scaled_array * 255
    preds = Image.fromarray(preds.astype("uint8"), mode='L')
    preds.save("gray.png")
    img.save("RGB.png")
    print("Done")

res101 swinl Figure 13

QGLab avatar Jan 09 '24 09:01 QGLab

The model I used was downloaded through the download link provided in README.md, so I don’t know where the error is for the above problem, and I hope to be corrected.

QGLab avatar Jan 09 '24 09:01 QGLab

Referring to the previous issues, I made a little modification to my test code (set the vmin=0.1 and vmax=80 of the colorize function), but the same problem still exists. Need you help.

QGLab avatar Jan 09 '24 15:01 QGLab

did you solve this problem? I also meet the similar problem with the batch_size of 1.

suzdl avatar May 10 '24 03:05 suzdl

Sorry. I can't find the cause.

QGLab avatar May 10 '24 03:05 QGLab

这里直接用中文也可以

suzdl avatar May 10 '24 03:05 suzdl