Open dichen-cd opened 7 years ago
Hi there, I got some problem extracting feature from a given roi. The code I wrote is
def _im_exfeat(self, image, roi): """ image: ( ndarray ) (H x W x 3 ) roi: (ndarray) (1 x 4) [x1, y1, x2, y2] """ im_data, im_scales = self.get_image_blob(image) roi = np.hstack([np.zeros((1, 1)), roi]) roi = network.np_to_variable(roi, is_cuda=True) * im_scales[0] im_data = network.np_to_variable(im_data, is_cuda=True) im_data = im_data.permute(0, 3, 1, 2) features = self.rpn.features(im_data) pooled_features = self.roi_pool(features, roi) x = pooled_features.view(pooled_features.size()[0], -1) x = self.fc6(x) x = self.fc7(x) return x
It is a method inside the FasterRCNN class. What I'm not sure about is the given roi. There're three choices of the different version:
Since there's no detailed comment in the roi-pooling-related code, I'm not sure which one to use. Hope you could give me some hint.
Thank you.
Hi there, I got some problem extracting feature from a given roi. The code I wrote is
It is a method inside the FasterRCNN class. What I'm not sure about is the given roi. There're three choices of the different version:
Since there's no detailed comment in the roi-pooling-related code, I'm not sure which one to use. Hope you could give me some hint.
Thank you.