Skip to content

Support for Batch-Inference #14

@alphacoder01

Description

@alphacoder01

Hi,

I need to perform batch inference for my use-case. I followed this thread here that extends the DefaultPredictor class to enable batched inputs. But I end up with this error

grit/modeling/roi_heads/grit_roi_heads.py:230, in GRiTROIHeadsAndTextDecoder._forward_box(self, features, proposals, targets, task)
    227 predictor, predictions, proposals = head_outputs[-1]
    228 boxes = predictor.predict_boxes(
    229     (predictions[0], predictions[1]), proposals)
--> 230 assert len(boxes) == 1
    231 pred_instances, _ = self.fast_rcnn_inference_GRiT(
    232     boxes,
    233     scores,
   (...)
    239     self.soft_nms_enabled,
    240 )
    242 assert len(pred_instances) == 1, "Only support one image"

AssertionError: 

Uncommenting the assertion doesn't help either.

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