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.

Inference with specified Region of Interest

See original GitHub issue

Hi everyone, I was wondering if there is an option on torchio where I can do inference upon an image but with a specified region of interest.

What I am trying to say is:

  1. I have: Torchio Subject, trained model, RoI mask mask.nii.gz
  2. Using this mask.nii.gz, I will find a bounding box, and only forward pass the bounding boxed image through the model (with some padding if necessary - to maintain the downsampled dimensions in the U-Net)

I was wondering if there is any way where I can add the bounding box as another attribute of the torchio Subjectobject and it does inference automatically upon that.

Please let me know if something is not clear. Thanks, Megh

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
meghbhaleraocommented, Dec 26, 2020

Thank you @fepegar, I think the crop/pad function would solve my problem - I can give a mask as a LabelMap and use the croporpad method to crop the image and then forward pass it. Thanks again

0reactions
meghbhaleraocommented, Jan 3, 2021

Thanks for your reply, @fepegar. I will open a new issue as this could happen for other transforms as well. Thanks, Megh

Read more comments on GitHub >

github_iconTop Results From Across the Web

Applying Inference over Specific Frame Regions with NVIDIA ...
This tutorial shares how to apply inference over a predefined area of the incoming video frames.
Read more >
Run object Detection in specified ROI (Region of Interest) #2056
I have built a custom object detection model and it's detecting the object with good accuracy. Now i want to build an Automatic...
Read more >
Digging into Detectron 2 — part 5 | by Hiroto Honda - Medium
The proposal boxes are used to crop the regions of interest (ROIs) from the feature maps, which are fed to the Box Head....
Read more >
Region of Interest Pooling - Towards Data Science
Region of Interest (ROI) pooling is used for utilising single feature map for all the proposals generated by RPN in a single pass....
Read more >
1. Inference Modes - Supervisely SDK for Python
* In a pipeline setting, run inference only on specially selected regions. A typical example of this is first running a detection model...
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