Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

mhalvers/clay-segmentation-practice

Repository files navigation

Chesapeake Land Cover Segmentation

A land cover segmentation project using the Clay Foundation Model for Chesapeake Bay watershed analysis. This project demonstrates the segmentation capabilities of the Clay model through containerized deployment.

Note: This project is purely for educational purposes and personal learning in geospatial ML and deployment strategies.

Overview

This repository focuses on the segmentation module of the Clay Foundation Model, specifically trained on the Chesapeake Conservancy Land Cover dataset. It includes:

  • Pre-trained segmentation model for 7-class land cover classification
  • Containerized deployment using Docker and AWS Lambda
  • Local inference testing and visualization tools

Land Cover Classes:

  • Water
  • Tree Canopy / Forest
  • Low Vegetation / Field
  • Barren Land
  • Impervious (other)
  • Impervious (road)
  • No Data

Documentation

  • Model Training: See segment.md for information about the segmentation model architecture and training process
  • Deployment: See deployment README for comprehensive deployment instructions including:
    • Local Docker deployment with Lambda Runtime Interface Emulator
    • AWS Lambda containerized deployment (with known limitations)
    • API usage and visualization examples

Quick Start

Local Inference with Docker

# Build the Docker image (from deployment/aws_lambda directory)
cd deployment/aws_lambda
docker build -t chesapeake-segmentation:latest -f Dockerfile ../../
# Run locally
docker run -p 9000:8080 chesapeake-segmentation:latest
# Make a prediction
curl -X POST http://localhost:9000/2015-03-31/functions/function/invocations \
 -H "Content-Type: application/json" \
 -d @test_event.json > response.json
# Visualize the result
python visualize_response.py response.json

Installation

Clone the repository:

git clone <repo-url>
cd model

Set up the environment:

mamba env create --file environment.yml
mamba activate claymodel

Attribution

This project is based on the Clay Foundation Model and uses the Clay v1.5 foundation model with a Chesapeake-specific segmentation head. The original Clay model is licensed under Apache 2.0.

What's included from Clay:

  • Core model architecture (claymodel/model.py, claymodel/factory.py)
  • Segmentation module (claymodel/finetune/segment/)
  • Pre-trained Clay v1.5 checkpoint and Chesapeake segmentation weights

License

This project is licensed under the Apache 2.0 License, consistent with the original Clay Foundation Model.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /