KaihuaTang / VCTree-Scene-Graph-Generation

Code for the Scene Graph Generation part of CVPR 2019 oral paper: "Learning to Compose Dynamic Tree Structures for Visual Contexts"
MIT License
121 stars 15 forks source link

generate scene graph for random image without any gt boxes, classes or relations #3

Open Thoudancer opened 5 years ago

Thoudancer commented 5 years ago

Hello, can we generate scenegraph for random image without any gt boxes, classes or relations using the sgdet model?

if so, what part of code should i change or what file should i prepare?

monkey1208 commented 5 years ago

I think you can try adding an if/else in lib/object_detector.py just like the code below which is written by the author of neural-motifs. if self.training and not self.mode == 'gtbox': pred_to_gtbox = bbox_overlaps(box_priors, gt_boxes).data pred_to_gtbox[im_inds.data[:, None] != gt_classes.data[None, :, 0]] = 0.0 max_overlaps, argmax_overlaps = pred_to_gtbox.max(1) rm_obj_labels = gt_classes[:, 1][argmax_overlaps] rm_obj_labels[max_overlaps < 0.5] = 0 else: rm_obj_labels = None

forbiddenname commented 4 years ago

Hello, can we generate scenegraph for random image without any gt boxes, classes or relations using the sgdet model?

if so, what part of code should i change or what file should i prepare?

hi! have you solved this problem? tks