rowanz / neural-motifs

Code for Neural Motifs: Scene Graph Parsing with Global Context (CVPR 2018)
https://rowanzellers.com/neuralmotifs
MIT License
525 stars 115 forks source link

A small problem about w & h of an image. #20

Closed zhiyong1997 closed 6 years ago

zhiyong1997 commented 6 years ago

Hi, Rowan, Thanks for sharing your code. I've noticed maybe a small bug. In __visual_genome.py, getitem__ function:

w, h = image_unpadded.size

if h > w:
        im_size = (IM_SCALE, int(w * img_scale_factor), img_scale_factor)
else:
        ...

why the order of w & h is reversed?

I'm not very sure because I've not read the code thoroughly. If this is a bug, will it influence the following codes?

Thanks!

zhiyong1997 commented 6 years ago

Oh, I guess it's because pytorch vgg models expects H, W format, sorry for bother.