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

V1 model inference with NAIP #247

Merged
merged 32 commits into from
Jul 23, 2024
Merged

V1 model inference with NAIP #247

merged 32 commits into from
Jul 23, 2024

Conversation

lillythomas
Copy link
Contributor

The purpose of this PR is to create a notebook demonstrating how to run inference on new NAIP scenes. It may also serve the purpose of demonstrating sim search with the generated embeddings.

@lillythomas lillythomas force-pushed the naip_analysis branch 4 times, most recently from aae436c to 506a664 Compare May 9, 2024 22:58
@lillythomas
Copy link
Contributor Author

Some current examples of similarity search results generated with 3600~ embeddings from NAIP sized at 256x256 and the v0.5.3/mae_v0.5.3_epoch-08_val-loss-0.3150.ckpt checkpoint.

Screenshot 2024-05-10 at 11 44 27 AM Screenshot 2024-05-10 at 11 43 02 AM Screenshot 2024-05-10 at 11 42 00 AM Screenshot 2024-05-10 at 11 42 39 AM Screenshot 2024-05-10 at 11 42 25 AM Screenshot 2024-05-10 at 11 48 44 AM Screenshot 2024-05-10 at 11 48 16 AM

These are all from the Bay area of California in 2020. Kind of crazy that it even captures similarity between open ocean surfaces with specifically visible white capping.

The notebook in this PR can be run to reproduce.

@yellowcap
Copy link
Member

@lillythomas I think this is a great example, and I think we should polish this up and add to the tutorials. I wanted to ask if you would be up for using stacchip for the data generation in the example 😊 . I made some small changes to stacchip to make it easier to use. Creating naip tiles is now just a few lines of code, see https://clay-foundation.github.io/stacchip/naip-tutorial/ .

@lillythomas
Copy link
Contributor Author

@yellowcap sounds good! I'll work on swapping the method for getting NAIP chips to use stacchip and request your review on it.

yellowcap added a commit that referenced this pull request Jul 1, 2024
Copy link
Member

@yellowcap yellowcap left a comment

Choose a reason for hiding this comment

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

Looks great overall! I did a few suggestions, mostly cosmetic changes here #287 .

A few more householding things

  • Remove the non-stacchip example,
  • Move the tutorial into the tutorials section of the docs (will need and update of the relative paths in the notebook)
  • Run the notebook and commit the cells with output, but replace the image with a markdown cell that renders the image that you can upload to the PR. A bit hacky but keeps the repo small.

Copy link
Member

@yellowcap yellowcap left a comment

Choose a reason for hiding this comment

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

Almost there! Just a few small comments, mainly cosmetic things. Feel free to merge when updated.

  • Register new notebook to _toc.yml
  • add lancedb to pip install
  • The cell where chips are downloaded is duplicated, remove older version
  • Update relative paths to ../.. (notebook requires to levels down)
  • Centroid extraction can be simplified:
    Replace
    lon, lat = box(
        bounding_box[0], bounding_box[1], bounding_box[2], bounding_box[3]
    ).centroid.coords[0]

with

    lon, lat = bounding_box.centroid.coords[0]

@lillythomas lillythomas merged commit d75f4eb into main Jul 23, 2024
3 checks passed
@lillythomas lillythomas deleted the naip_analysis branch July 23, 2024 22:26
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.

None yet

2 participants