Skip to content

About the bbox #5

@BAZINGAC

Description

@BAZINGAC

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions