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

FRML-153 Migrate const rotated dataset spec as variant in presets #72

Merged
merged 3 commits into from
Jun 11, 2024

Conversation

Eve-ning
Copy link
Contributor

@Eve-ning Eve-ning commented Jun 11, 2024

Previously, when we create a static evaluation dataset (i.e. 8 unique orients) we need to invoke the dataset as:

ds=FRDCDatasetStaticEval(
    "chestnut_nature_park",
    "20210510",
    "90deg43m85pct255deg",
...

This was clunky and flaky for several reasons:

  1. We had to manually specify the exact string path to the dataset
  2. Static Eval was entirely decoupled from the preset ecosys
  3. It was inconsistent with the preset syntax we used for train and validation

Now, we adapt the code to use the following, which is cleaner

ds=ds.chestnut_20210510_43m.const_rotated(
    transform=const_weak_aug(im_size),
    transform_scale=train_lab_ds.x_scaler,
),

This follows the same motif as .labelled, .unlabelled when we invoke any dataset preset.

Note

One can technically change any FRDCDataset to FRDCUnlabelledDataset or FRDCStaticRotatedDataset by simply changing the __class__ attribute to force it to use another interface

Major Changes

  • Moved FRDCStaticEvalDataset to presets.py as a dataset variant
  • Updated training scripts to use new dataset variant

@Eve-ning Eve-ning merged commit 8e17245 into 0.1.1 Jun 11, 2024
3 checks passed
@Eve-ning Eve-ning deleted the frml-153 branch June 11, 2024 07:15
@Eve-ning Eve-ning mentioned this pull request Jun 19, 2024
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