Skip to content

Running inference with a trained (single) detector#125

Draft
sfmig wants to merge 61 commits into
mainfrom
smg/faster-rcnn-pl
Draft

Running inference with a trained (single) detector#125
sfmig wants to merge 61 commits into
mainfrom
smg/faster-rcnn-pl

Conversation

@sfmig
Copy link
Copy Markdown
Member

@sfmig sfmig commented Dec 11, 2025

TODO:

  • review tests for get_detector_collate_fn
  • review API ref for get_detector_collate_fn
  • finish example

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?

What does this PR do?

  • Lightning module for torchvision CNN-based detectors
  • InferenceImageDataset
  • Utils
  • Example for proofreading
  • Simplify docs templates

References

Please reference any existing issues/PRs that relate to this PR.

How has this PR been tested?

Please explain how any new code has been tested, and how you have ensured that no existing functionality has changed.

Is this a breaking change?

If this PR breaks any existing functionality, please explain how and why.

Does this PR require an update to the documentation?

If any features have changed, or have been added. Please explain how the
documentation has been updated.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

@sfmig sfmig force-pushed the smg/faster-rcnn-pl branch from a171b67 to edbc369 Compare December 12, 2025 16:21
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.58%. Comparing base (74c3297) to head (208432d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #125      +/-   ##
==========================================
+ Coverage   99.45%   99.58%   +0.12%     
==========================================
  Files           8       11       +3     
  Lines         555      721     +166     
==========================================
+ Hits          552      718     +166     
  Misses          3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

sfmig added 28 commits December 19, 2025 18:46
…. When padding allow casting np.nan (float64) to float32 (same kind). Adapt tests.
Signed-off-by: sfmig <33267254+sfmig@users.noreply.github.com>
# Create dataset

images_dir = data_dir / "experts" / "images"
dataset = InferenceImageDataset(
Copy link
Copy Markdown
Member Author

@sfmig sfmig Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: can I read the annotations as an ethology dataset, and convert that xarray to a Pytorch-compatible dataset (with xbatcher.loaders.torch.MapDataset, see this example)?

Is it a good idea to add the images to the annotations dataset? (do I need to?)

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

Successfully merging this pull request may close these issues.

1 participant