Hello everyone,
I’m facing a problem when trying to re-define Faster R-CNN.
I have copied all of the code in the torchvision implementation of Faster R-CNN, properly modifying the path to libraries (ex: prepending ‘torchvision.models.detection’ to libraries requiring it).
The strange thing is: if I do not re-define class FasterRCNN(GeneralizedRCNN)
everythin is good and no error arises. But as soon as I write - COPY AND PASTE from the link, no modifications - such class I get an error.
/usr/local/lib/python3.6/dist-packages/torchvision/ops/poolers.py in setup_scales(self, features, image_shapes)
109 # get the levels in the feature map by leveraging the fact that the network always
110 # downsamples by a factor of 2 at each level.
--> 111 lvl_min = -torch.log2(torch.tensor(scales[0], dtype=torch.float32)).item()
112 lvl_max = -torch.log2(torch.tensor(scales[-1], dtype=torch.float32)).item()
113 self.scales = scales
IndexError: list index out of range
Any suggestion?
My current version of torchvision
is 0.4.2, which should be the last stable version.
Thank you.