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:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 annotationsThanks @fmassa, we’re okay with waiting for Union to go in.
@datumbox I updated the description.