Spaces:
Runtime error
Runtime error
Upload README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Sea Ice Segmentation β Hugging Face Space
|
| 2 |
|
| 3 |
Gradio app that runs MMSegmentation SegFormer-B5 on RGB images and returns an overlayed segmentation result.
|
|
@@ -5,9 +16,6 @@ Gradio app that runs MMSegmentation SegFormer-B5 on RGB images and returns an ov
|
|
| 5 |
## Repo layout
|
| 6 |
- `app.py` β Gradio UI and inference code.
|
| 7 |
- `requirements.txt` β Python dependencies for the Space.
|
| 8 |
-
- `model/`
|
| 9 |
-
- `segformer_mit-b5_8xb1-160k_pre-cityscapes_seaicergb0-1024x1024.py` β MMSeg config.
|
| 10 |
-
- `iter_160000.pth` β trained checkpoint (tracked with Git LFS).
|
| 11 |
|
| 12 |
## Run locally (optional)
|
| 13 |
```bash
|
|
@@ -17,17 +25,10 @@ python app.py
|
|
| 17 |
|
| 18 |
## Deploy to Hugging Face Spaces
|
| 19 |
1. Create a new Space (SDK: Gradio). CPU is fine; GPU optional for faster inference.
|
| 20 |
-
2. Push this repo to the Space remote.
|
| 21 |
-
```bash
|
| 22 |
-
git lfs install
|
| 23 |
-
git lfs track "model/*.pth"
|
| 24 |
-
git add .gitattributes model/iter_160000.pth
|
| 25 |
-
git commit -m "Add checkpoint via LFS"
|
| 26 |
-
git push
|
| 27 |
-
```
|
| 28 |
-
3. The Space will build and start. First cold-start may take a few minutes while installing dependencies.
|
| 29 |
|
| 30 |
## Notes
|
| 31 |
- If your config defines `classes` and `palette`, the app will use them automatically; otherwise it falls back to generated colors.
|
| 32 |
- Large input images are supported; overlay alpha can be adjusted in the UI.
|
| 33 |
-
-
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Sea Ice SegFormer
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: "4.12.0"
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
# Sea Ice Segmentation β Hugging Face Space
|
| 13 |
|
| 14 |
Gradio app that runs MMSegmentation SegFormer-B5 on RGB images and returns an overlayed segmentation result.
|
|
|
|
| 16 |
## Repo layout
|
| 17 |
- `app.py` β Gradio UI and inference code.
|
| 18 |
- `requirements.txt` β Python dependencies for the Space.
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
## Run locally (optional)
|
| 21 |
```bash
|
|
|
|
| 25 |
|
| 26 |
## Deploy to Hugging Face Spaces
|
| 27 |
1. Create a new Space (SDK: Gradio). CPU is fine; GPU optional for faster inference.
|
| 28 |
+
2. Push this repo to the Space remote (no large files needed). The Space will build and start. First cold-start may take a few minutes while installing dependencies.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
## Notes
|
| 31 |
- If your config defines `classes` and `palette`, the app will use them automatically; otherwise it falls back to generated colors.
|
| 32 |
- Large input images are supported; overlay alpha can be adjusted in the UI.
|
| 33 |
+
- The app downloads the config and checkpoint from the model repo `triton7777/SeaIce` at runtime (no .pth stored in this Space).
|
| 34 |
+
- To switch checkpoints or configs, update `REPO_ID`, `CONFIG_FILENAME`, and `CHECKPOINT_FILENAME` at the top of `app.py`.
|