Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -7,20 +7,22 @@ sdk_version: 5.44.1
|
|
| 7 |
app_file: app.py
|
| 8 |
pinned: false
|
| 9 |
license: mit
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
arxiv.org/abs/2505.24216
|
| 13 |
-
|
| 14 |
# Shuffle PatchMix (SPM) — Hugging Face Space
|
| 15 |
|
| 16 |
-
|
| 17 |
|
| 18 |
GitHub repo: https://github.com/PrasannaPulakurthi/SPM
|
| 19 |
|
|
|
|
|
|
|
| 20 |
## Parameters
|
| 21 |
- **Grid (N×N):** Choose one of **2×2, 4×4, 8×8, 16×16**. The image is cropped (top-left) so its width and height are divisible by N.
|
| 22 |
-
- **Enable
|
| 23 |
-
- **Overlap (px):** Pixel overlap per side. Automatically clipped to `<
|
| 24 |
- **Mix probability:** Per-patch probability to mix original and a shuffled patch.
|
| 25 |
- **Beta α, β:** Shape parameters for the Beta distribution used for blending weights.
|
| 26 |
- **Seed:** Optional deterministic seed.
|
|
@@ -28,12 +30,6 @@ GitHub repo: https://github.com/PrasannaPulakurthi/SPM
|
|
| 28 |
## Batch Mode
|
| 29 |
Upload a `.zip` containing images (`.png`, `.jpg`, `.jpeg`). The app returns a `.zip` of augmented results with the same folder structure.
|
| 30 |
|
| 31 |
-
## Notes
|
| 32 |
-
- Non-overlap path uses **one alpha per image**; overlap path uses **alpha per patch** to mirror your reference snippet (edit in `spm.py` if you prefer one alpha per image).
|
| 33 |
-
- Feather size equals the overlap (you can decouple by adjusting `create_feather_mask` calls).
|
| 34 |
-
- If you want parity with a specific paper version, swap in your official implementation but keep the signature:
|
| 35 |
-
`spm_augment(image, num_patches, mix_prob, beta_a, beta_b, overlap_px, seed)`.
|
| 36 |
-
|
| 37 |
## Local Development
|
| 38 |
```bash
|
| 39 |
pip install -r requirements.txt
|
|
@@ -41,4 +37,4 @@ python app.py
|
|
| 41 |
```
|
| 42 |
|
| 43 |
## License
|
| 44 |
-
MIT
|
|
|
|
| 7 |
app_file: app.py
|
| 8 |
pinned: false
|
| 9 |
license: mit
|
| 10 |
+
emoji: 🔥
|
| 11 |
+
short_description: An interactive demo for SPM augmentation.
|
| 12 |
---
|
| 13 |
|
|
|
|
|
|
|
| 14 |
# Shuffle PatchMix (SPM) — Hugging Face Space
|
| 15 |
|
| 16 |
+
An interactive demo for SPM augmentation.
|
| 17 |
|
| 18 |
GitHub repo: https://github.com/PrasannaPulakurthi/SPM
|
| 19 |
|
| 20 |
+
arxiv.org/abs/2505.24216
|
| 21 |
+
|
| 22 |
## Parameters
|
| 23 |
- **Grid (N×N):** Choose one of **2×2, 4×4, 8×8, 16×16**. The image is cropped (top-left) so its width and height are divisible by N.
|
| 24 |
+
- **Enable Overlap Patch Blend):** When enabled, each base cell expands by ±overlap pixels (2× at borders to keep areas comparable) and patches are blended with a feather mask.
|
| 25 |
+
- **Overlap (px):** Pixel overlap per side. Automatically clipped to `< 1/2 * patch size`.
|
| 26 |
- **Mix probability:** Per-patch probability to mix original and a shuffled patch.
|
| 27 |
- **Beta α, β:** Shape parameters for the Beta distribution used for blending weights.
|
| 28 |
- **Seed:** Optional deterministic seed.
|
|
|
|
| 30 |
## Batch Mode
|
| 31 |
Upload a `.zip` containing images (`.png`, `.jpg`, `.jpeg`). The app returns a `.zip` of augmented results with the same folder structure.
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
## Local Development
|
| 34 |
```bash
|
| 35 |
pip install -r requirements.txt
|
|
|
|
| 37 |
```
|
| 38 |
|
| 39 |
## License
|
| 40 |
+
MIT
|