Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Batch-Inference #14

Open
alphacoder01 opened this issue Dec 25, 2023 · 1 comment
Open

Support for Batch-Inference #14

alphacoder01 opened this issue Dec 25, 2023 · 1 comment

Comments

@alphacoder01
Copy link

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.

@linkangheng
Copy link

May I ask if you have solved this problem? I have also encountered this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants