Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
QGLab opened this issue Jan 9, 2024 · 5 comments
Open

Comments

@QGLab
Copy link

QGLab commented Jan 9, 2024

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
Copy link
Author

QGLab commented Jan 9, 2024

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
Copy link
Author

QGLab commented Jan 9, 2024

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.

@suzdl
Copy link

suzdl commented May 10, 2024

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

@QGLab
Copy link
Author

QGLab commented May 10, 2024

Sorry. I can't find the cause.

@suzdl
Copy link

suzdl commented May 10, 2024

这里直接用中文也可以

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants