-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
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")Metadata
Metadata
Assignees
Labels
No labels


