question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

roi_align and roi_pool cannot be scripted due to type annotation issue

See original GitHub issue

🚀 Feature

roi_align anf roi_pool cannot be scripted due to type annotation issue

https://github.com/pytorch/vision/blob/7bc5bd855536c34a1759d125436f791dde4fb8b7/torchvision/ops/roi_pool.py#L13 https://github.com/pytorch/vision/blob/7bc5bd855536c34a1759d125436f791dde4fb8b7/torchvision/ops/roi_align.py#L13

The input “boxes” can be either a tensor or list, however the type annotation does not cover the list case. Once JIT support Union types the annotation should be updated to Union of Tensor and List.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
fmassacommented, Apr 27, 2021

I think what we can do for now is to improve the documentation to mention that torchscript only supports Tensor, while eager mode supports both.

It looks like Union would be soon supported in torchscript though, so we might instead just wait a bit more before we modify the type annotations

0reactions
neginraoofcommented, Apr 27, 2021

Thanks @fmassa, we’re okay with waiting for Union to go in.

@datumbox I updated the description.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fusing attention mechanism with Mask R-CNN for instance ...
Example annotation of an occluded grape cluster for instance segmentation. ... the RoIPool layer of the original Faster R-CNN with RoIAlign, ...
Read more >
Speeding Up Semantic Instance Segmentation by Using ...
Using this strategy, the execution time is strongly reduced while preserving the accuracy at state-of-the-art levels. We evaluate our solution on two datasets ......
Read more >
A Novel Defect Detection Method for Ferrite Shield Surface ...
Abstract. Traditional manual inspection of small objects such as ferrite shield surface defects through naked eyes is labour-intensive and inefficient, ...
Read more >
Deep Learning for Generic Object Detection: A Survey
The first type aims to detect instances of a particular object (such ... Recognition problems related to generic object detection: a image ...
Read more >
Detecting and learning city intersection traffic contexts for ...
support the detection and classification of different types of traffic ... While RoIpool worked very well for Faster RCNN in object detection problems,....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found