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

Adding user-specified cutout crop size. #49

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

mtauraso
Copy link
Collaborator

@mtauraso mtauraso commented Aug 26, 2024

NOTE: This PR is based on #33 If you are reviewing review that one first.

Once PR 33 is merged the diff view on this will get much easier. For now look at the last commit's diff only (bc75191)

  • Objects who have any cutouts not capable of providing enough pixels are pruned
  • data_loader:crop_to is the config where pixel values are specified
  • Not providing the config gives you the old auto-detect behavior where the
    largest size that will work for all images in the data path is chosen.

@mtauraso mtauraso changed the title Issue/35/cutout interface cleanup Adding user-specified cutout crop size. Aug 26, 2024
@mtauraso mtauraso requested a review from drewoldag August 26, 2024 23:32
@mtauraso mtauraso self-assigned this Aug 26, 2024
@mtauraso mtauraso linked an issue Aug 26, 2024 that may be closed by this pull request
@mtauraso mtauraso marked this pull request as ready for review August 26, 2024 23:33
Copy link

codecov bot commented Aug 26, 2024

Codecov Report

Attention: Patch coverage is 94.20290% with 4 lines in your changes missing coverage. Please review.

Project coverage is 46.63%. Comparing base (79293c8) to head (9cd3680).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/fibad/data_loaders/hsc_data_loader.py 94.20% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #49      +/-   ##
==========================================
+ Coverage   43.86%   46.63%   +2.76%     
==========================================
  Files          16       16              
  Lines         554      579      +25     
==========================================
+ Hits          243      270      +27     
+ Misses        311      309       -2     

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

Copy link

github-actions bot commented Aug 26, 2024

Before [79293c8] After [ff1321a] Ratio Benchmark (Parameter)
3.74±0.6s 3.47±0.9s 0.93 benchmarks.time_computation
3.6k 288 0.08 benchmarks.mem_list

Click here to view all benchmarks.

@mtauraso mtauraso requested a review from aritraghsh09 August 26, 2024 23:35
Copy link
Collaborator

@aritraghsh09 aritraghsh09 left a comment

Choose a reason for hiding this comment

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

Left some comments to address; but nothing major that blocks a merge.

f"HSCDataSet in {self.path} has the wrong group of filters for object {object_id}."
)
logger.warning(f"Dropping object {object_id} from the dataset.")
msg = f"HSCDataSet in {self.path} has the wrong group of filters for object {object_id}."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might be useful to mention that we are dropping this object explicitly

src/fibad/data_loaders/hsc_data_loader.py Outdated Show resolved Hide resolved
src/fibad/data_loaders/hsc_data_loader.py Outdated Show resolved Hide resolved
- Objects who have any cutouts not capable of providing enough pixels are pruned
- data_loader:crop_to is the config where pixel values are specified
- Not providing the config gives you the old auto-detect behavior where the
  largest size that will work for all images in the data path is chosen.
@mtauraso mtauraso force-pushed the issue/35/cutout-interface-cleanup branch from 982e502 to 9cd3680 Compare August 27, 2024 23:24
@mtauraso mtauraso merged commit f5b57da into main Aug 29, 2024
9 checks passed
@mtauraso mtauraso deleted the issue/35/cutout-interface-cleanup branch August 29, 2024 18:12
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.

HSC Data loader should accept a user-defined cutout size
2 participants