lyndonzheng / Synthetic2Realistic

[ECCV 2018]: T2Net: Synthetic-to-Realistic Translation for Depth Estimation Tasks
180 stars 42 forks source link

Normalization for Depth #31

Closed koutilya-pnvr closed 5 years ago

koutilya-pnvr commented 5 years ago

https://github.com/lyndonzheng/Synthetic2Realistic/blob/f06db4734b89f80b76f9362ddec17f8eaf1216db/dataloader/data_loader.py#L54

The source label which is a 1 channel depth map is going through a series of transformations. Among them Normalization is one of it.

https://github.com/lyndonzheng/Synthetic2Realistic/blob/f06db4734b89f80b76f9362ddec17f8eaf1216db/dataloader/data_loader.py#L112

But this form of Normalization only works for 3 channel images, where as depth is only 1 channel. Running this is yielding a Floating point exception (core dumped) error. Just wondering how everyone was able to run this.

BTW I am working with Virtual Kittti and Kitti datasets.

lyndonzheng commented 5 years ago

@koutilya40192 Thanks for pointing out this. I tried this in the latest pytorch1.2 version, we can only use one channel mean and std for the normalization. You can use transforms.Normalize((0.5, ), (0.5,)) for the depth.

koutilya-pnvr commented 5 years ago

Thanks for your response.