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

Inference error and query #27

Closed
li8bot opened this issue Apr 21, 2020 · 2 comments
Closed

Inference error and query #27

li8bot opened this issue Apr 21, 2020 · 2 comments
Labels
bug Something isn't working solution added Solution added to the raised issue

Comments

@li8bot
Copy link
Contributor

li8bot commented Apr 21, 2020

After training the model, when trying to run inference with Cornernet using

boxes = gtf.Predict("./output/v4/101.jpg", vis_thresh=0.9, output_img="output.jpg")

following error is thrown. Is there a way to disable output image creation?

/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py:2506: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
  "See the documentation of nn.Upsample for details.".format(mode))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-25-923121f2acd1> in <module>()
----> 1 boxes = gtf.Predict("./output/v4/101.jpg", vis_thresh=0.9, output_img="output.jpg")
      2 from IPython.display import Image
      3 Image(filename='output.jpg')

1 frames
/content/Monk_Object_Detection/6_cornernet_lite/lib/core/vis_utils.py in draw_bboxes(image, bboxes, font_size, thresh, colors)
     23     for cat_name in bboxes:
     24         keep_inds = bboxes[cat_name][:, -1] > thresh
---> 25         cat_size  = cv2.getTextSize(cat_name +' : %.2f' % bboxes[cat_name][:, -1], cv2.FONT_HERSHEY_SIMPLEX, font_size, 2)[0]
     26 
     27         if colors is None:

TypeError: only size-1 arrays can be converted to Python scalars
abhi-kumar added a commit that referenced this issue Apr 22, 2020
@abhi-kumar
Copy link
Contributor

@li8bot please check if the issue is resolved

@abhi-kumar abhi-kumar added bug Something isn't working solution added Solution added to the raised issue labels Apr 22, 2020
@abhi-kumar
Copy link
Contributor

Closing due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working solution added Solution added to the raised issue
Projects
None yet
Development

No branches or pull requests

2 participants