prasannareddyp commited on
Commit
e43dbe7
·
verified ·
1 Parent(s): 5ece709

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +28 -2
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  title: SPM
3
- emoji: 🐠
4
  colorFrom: green
5
  colorTo: pink
6
  sdk: gradio
@@ -11,4 +11,30 @@ license: mit
11
  short_description: Shuffle PatchMix Augmentation
12
  ---
13
 
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: SPM
3
+ emoji: 🚀
4
  colorFrom: green
5
  colorTo: pink
6
  sdk: gradio
 
11
  short_description: Shuffle PatchMix Augmentation
12
  ---
13
 
14
+ # Shuffle PatchMix (SPM) Hugging Face Space
15
+
16
+ A minimal interactive demo for SPM-style augmentation. Upload an image (or a .zip of images), set **grid size (N×N)**, and download the augmented outputs.
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
+ - **Mix probability:** Per-patch probability to mix original and a shuffled patch.
23
+ - **Beta α, β:** Shape parameters for a single per-image alpha sampled from Beta(α,β).
24
+ - **Seed:** Optional deterministic seed.
25
+
26
+ ## Batch Mode
27
+ Upload a `.zip` containing images (`.png`, `.jpg`, `.jpeg`). The app returns a `.zip` of augmented results with the same folder structure.
28
+
29
+ ## Notes
30
+ - This uses a **global** patch permutation and per-patch mixing with a **single** alpha per image (tweak in `spm.py` if you want per-patch alpha or different strategies).
31
+ - If you want parity with a specific paper version, swap in your official implementation but keep `spm_augment(image, num_patches, mix_prob, beta_a, beta_b, seed)`.
32
+
33
+ ## Local Development
34
+ ```bash
35
+ pip install -r requirements.txt
36
+ python app.py
37
+ ```
38
+
39
+ ## License
40
+ MIT