Image Pipeline Playground
feat(frontend): add Albumentations multi-target template
Mohammad Rajaei558ffd277712
diff --git a/README.md b/README.mdindex ee5ff05..43c0101 100644--- a/README.md+++ b/README.md@@ -29,7 +29,7 @@ It is useful for:- Result caching and seeded stochastic nodes for reproducible experiments- **Run to selected** — execute only ancestors of a node while tuning parameters- **Starters** palette group for source nodes (Load Images, Blank Image, Annotations, …)-- **Export** / **Load** workflow JSON; **Example** loads the bundled Lena blur→Canny pipeline+- **Export** / **Load** workflow JSON; **Templates** gallery includes Blur & Canny, Hist Equalize, Morphology, Contours, and Albu Augment- **Export Python** to a standalone script in the Monaco panel- Catalog-driven UI — the frontend does not hard-code nodes; `/api/nodes` metadata builds the palette automatically@@ -117,7 +117,7 @@ docker compose up --build7. Use **Export** / **Load** for workflow JSON; **Export Python** for a standalone script.8. Open **About** (info button next to the brand) for license and GitHub.-Example workflow: [`backend/examples/blur_canny.json`](backend/examples/blur_canny.json) (uses [`backend/examples/lena.png`](backend/examples/lena.png)).+Example workflows live under [`backend/examples/`](backend/examples/) (e.g. [`blur_canny.json`](backend/examples/blur_canny.json), [`albumentations_augment.json`](backend/examples/albumentations_augment.json); image: [`lena.png`](backend/examples/lena.png)).## Albumentations augmentsdiff --git a/backend/examples/albumentations_augment.json b/backend/examples/albumentations_augment.jsonnew file mode 100644index 0000000..9f9c041--- /dev/null+++ b/backend/examples/albumentations_augment.json@@ -0,0 +1,88 @@+{+ "version": 1,+ "name": "albumentations-augment",+ "description": "Load Lena with annotations, apply Albumentations color jitter then horizontal flip (synced bboxes/keypoints).",+ "seed": 0,+ "sampleCount": 1,+ "graph": {+ "nodes": [+ {+ "id": "load-1",+ "type": "load_image",+ "params": { "path": "examples/lena.png" },+ "position": { "x": 0, "y": 80 }+ },+ {+ "id": "ann-1",+ "type": "annotations",+ "params": {+ "bboxes_json": "[[180, 80, 380, 320, \"face\"]]",+ "keypoints_json": "[[230, 180], [320, 180], [275, 250]]"+ },+ "position": { "x": 0, "y": 320 }+ },+ {+ "id": "jitter-1",+ "type": "albu_color_jitter",+ "params": {+ "brightness": 0.25,+ "contrast": 0.2,+ "saturation": 0.3,+ "hue": 0.05,+ "p": 1.0+ },+ "position": { "x": 280, "y": 120 }+ },+ {+ "id": "flip-1",+ "type": "albu_horizontal_flip",+ "params": { "p": 1.0 },+ "position": { "x": 560, "y": 120 }+ }+ ],+ "edges": [+ {+ "id": "e-img-jitter",+ "source": "load-1",+ "source_port": "image",+ "target": "jitter-1",+ "target_port": "image"+ },+ {+ "id": "e-bbox-jitter",+ "source": "ann-1",+ "source_port": "bboxes",+ "target": "jitter-1",+ "target_port": "bboxes"+ },+ {+ "id": "e-kp-jitter",+ "source": "ann-1",+ "source_port": "keypoints",+ "target": "jitter-1",+ "target_port": "keypoints"+ },+ {+ "id": "e-img-flip",+ "source": "jitter-1",+ "source_port": "image",+ "target": "flip-1",+ "target_port": "image"+ },+ {+ "id": "e-bbox-flip",+ "source": "jitter-1",+ "source_port": "bboxes",+ "target": "flip-1",+ "target_port": "bboxes"+ },+ {+ "id": "e-kp-flip",+ "source": "jitter-1",+ "source_port": "keypoints",+ "target": "flip-1",+ "target_port": "keypoints"+ }+ ]+ }+}diff --git a/frontend/public/examples/albumentations_augment.json b/frontend/public/examples/albumentations_augment.jsonnew file mode 100644index 0000000..9f9c041--- /dev/null+++ b/frontend/public/examples/albumentations_augment.json@@ -0,0 +1,88 @@+{+ "version": 1,+ "name": "albumentations-augment",+ "description": "Load Lena with annotations, apply Albumentations color jitter then horizontal flip (synced bboxes/keypoints).",+ "seed": 0,+ "sampleCount": 1,+ "graph": {+ "nodes": [+ {+ "id": "load-1",+ "type": "load_image",+ "params": { "path": "examples/lena.png" },+ "position": { "x": 0, "y": 80 }+ },+ {+ "id": "ann-1",+ "type": "annotations",+ "params": {+ "bboxes_json": "[[180, 80, 380, 320, \"face\"]]",+ "keypoints_json": "[[230, 180], [320, 180], [275, 250]]"+ },+ "position": { "x": 0, "y": 320 }+ },+ {+ "id": "jitter-1",+ "type": "albu_color_jitter",+ "params": {+ "brightness": 0.25,+ "contrast": 0.2,+ "saturation": 0.3,+ "hue": 0.05,+ "p": 1.0+ },+ "position": { "x": 280, "y": 120 }+ },+ {+ "id": "flip-1",+ "type": "albu_horizontal_flip",+ "params": { "p": 1.0 },+ "position": { "x": 560, "y": 120 }+ }+ ],+ "edges": [+ {+ "id": "e-img-jitter",+ "source": "load-1",+ "source_port": "image",+ "target": "jitter-1",+ "target_port": "image"+ },+ {+ "id": "e-bbox-jitter",+ "source": "ann-1",+ "source_port": "bboxes",+ "target": "jitter-1",+ "target_port": "bboxes"+ },+ {+ "id": "e-kp-jitter",+ "source": "ann-1",+ "source_port": "keypoints",+ "target": "jitter-1",+ "target_port": "keypoints"+ },+ {+ "id": "e-img-flip",+ "source": "jitter-1",+ "source_port": "image",+ "target": "flip-1",+ "target_port": "image"+ },+ {+ "id": "e-bbox-flip",+ "source": "jitter-1",+ "source_port": "bboxes",+ "target": "flip-1",+ "target_port": "bboxes"+ },+ {+ "id": "e-kp-flip",+ "source": "jitter-1",+ "source_port": "keypoints",+ "target": "flip-1",+ "target_port": "keypoints"+ }+ ]+ }+}diff --git a/frontend/src/workflow/templates.ts b/frontend/src/workflow/templates.tsindex 7fd5975..82b3d26 100644--- a/frontend/src/workflow/templates.ts+++ b/frontend/src/workflow/templates.ts@@ -31,4 +31,10 @@ export const WORKFLOW_TEMPLATES: WorkflowTemplate[] = [description: 'Threshold then find contours for structure analysis.',path: '/examples/contour_detect.json',},+ {+ id: 'albumentations_augment',+ name: 'Albu Augment',+ description: 'Annotations + color jitter + flip with synced bboxes/keypoints.',+ path: '/examples/albumentations_augment.json',+ },]