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

Why did you do the processing in this way? #53

Open
LulaSan opened this issue Jun 9, 2021 · 0 comments
Open

Why did you do the processing in this way? #53

LulaSan opened this issue Jun 9, 2021 · 0 comments

Comments

@LulaSan
Copy link

LulaSan commented Jun 9, 2021

Hi Diana and thank you for your work.
I am doing some real-time test with both webcam and RealSense D435i and I do the pre-process of the input image in the same way you did, but I obtain bad results compared with the ones of the test images.

def val_transform(self, rgb, depth):
               depth_np = depth
               transform = transforms.Compose([
                          transforms.Resize(250.0 / iheight),
                          transforms.CenterCrop((228, 304),
                          transforms.Resize(self.output_size),    
                ])
             rgb_np = transform(rgb)
             rgb_np = np.asfarray(rgb_np, dtype='float') / 255
        return rgb_np, depth_np

My input images are also 480,640 and I have already thought to convert them from BGR to RGB.
Can I ask you why did you apply this kind of pre-processing?
After the center crop,in fact, I obtain an image of (239,319,3) i.e. not square, so, doing the last resize, the image is being distorted a little bit, right?

Thank you in advance

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

1 participant