-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Hello,Is the box in the h5 file x,y,w,h, and x1,y1,x2,y2(spatial_feat[0, :] ,spatial_feat[1, :] ,spatial_feat[2, :] ,spatial_feat[3, :] ) are the points in the upper left and lower right corners?
with h5py.File(self.feature_h5, 'r') as f:
vision_feat = f['features'][index]
boxes = f['boxes'][index]
w = f['widths'][index]
h = f['heights'][index]
spatial_feat = np.zeros((5, len(boxes[0])))
spatial_feat[0, :] = boxes[0, :] * 2 / w - 1 # x1
spatial_feat[1, :] = boxes[1, :] * 2 / h - 1 # y1
spatial_feat[2, :] = boxes[2, :] * 2 / w - 1 # x2
spatial_feat[3, :] = boxes[3, :] * 2 / h - 1 # y2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels