meryadri commited on
Commit
ff6faa8
·
1 Parent(s): 388efcc

updated readme

Browse files
Files changed (1) hide show
  1. README.md +22 -0
README.md CHANGED
@@ -1,14 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
1
  # Image Mosaic Generator
2
 
3
  Turn any image into a photomosaic composed of color-matched tiles while collecting detailed performance metrics. This Gradio app ships with built-in benchmarking tools, profiling utilities, and reproducible analysis documented in `profiling_analysis.ipynb`.
4
 
5
  ## Features
 
6
  - **Interactive mosaic builder** with selectable grid size, color palette, and reference image size.
7
  - **Performance benchmark tab** that sweeps multiple configurations, plots the results, and logs cProfile + line_profiler stats.
8
  - **Automatic tile caching & vectorized mapping** for sub-second generation on 1024×1024 inputs.
9
  - **Validation & error messaging** to catch invalid grid/image combinations before processing.
10
 
11
  ## Installation
 
12
  ```bash
13
  # clone the repository
14
  git clone https://huggingface.co/spaces/meryadri/ImageMosaicGenerator
@@ -23,29 +36,38 @@ Turn any image into a photomosaic composed of color-matched tiles while collecti
23
  ```
24
 
25
  ## Usage
 
26
  ### Local Gradio app
 
27
  ```bash
28
  python app.py
29
  ```
 
30
  Visit `http://127.0.0.1:7860` and either upload an image or choose one of the curated examples. Ensure the selected grid size divides the target image size (e.g., 512px image with 32×32 grid) for best results.
31
 
32
  ### Command-line benchmarking
 
33
  The easiest way to reproduce the profiling numbers is to run the Performance Benchmark tab once. The first pass warms the tile cache; subsequent runs deliver the <10ms timings shown in the notebook.
34
 
35
  ## Deployed Demo
 
36
  The project is available as a Hugging Face Space: [ImageMosaicGenerator](https://huggingface.co/spaces/meryadri/ImageMosaicGenerator). The space automatically stays in sync with this repository.
37
 
38
  ## Profiling Report
 
39
  See [`profiling_analysis.ipynb`](profiling_analysis.ipynb) for:
 
40
  - benchmark data (before/after speedups)
41
  - cProfile summaries & line-profiler excerpts
42
  - discussion of optimized bottlenecks (tile caching, vectorized grid processing, preprocessing reuse)
43
 
44
  ## Contributing
 
45
  1. Fork the repository and open a feature branch.
46
  2. Run `python app.py` and ensure both Gradio tabs still function.
47
  3. Update the profiling notebook or README if your change affects performance.
48
  4. Submit a pull request with a brief summary of the improvement.
49
 
50
  ## License
 
51
  This project inherits the usage terms of the Hugging Face Space it powers. Refer to the Space card for additional information.
 
1
+ ---
2
+ title: ImageMosaicGenerator
3
+ emoji: 🏆
4
+ colorFrom: green
5
+ colorTo: pink
6
+ sdk: gradio
7
+ sdk_version: 5.45.0
8
+ app_file: app.py
9
+ pinned: false
10
+ ---
11
+
12
  # Image Mosaic Generator
13
 
14
  Turn any image into a photomosaic composed of color-matched tiles while collecting detailed performance metrics. This Gradio app ships with built-in benchmarking tools, profiling utilities, and reproducible analysis documented in `profiling_analysis.ipynb`.
15
 
16
  ## Features
17
+
18
  - **Interactive mosaic builder** with selectable grid size, color palette, and reference image size.
19
  - **Performance benchmark tab** that sweeps multiple configurations, plots the results, and logs cProfile + line_profiler stats.
20
  - **Automatic tile caching & vectorized mapping** for sub-second generation on 1024×1024 inputs.
21
  - **Validation & error messaging** to catch invalid grid/image combinations before processing.
22
 
23
  ## Installation
24
+
25
  ```bash
26
  # clone the repository
27
  git clone https://huggingface.co/spaces/meryadri/ImageMosaicGenerator
 
36
  ```
37
 
38
  ## Usage
39
+
40
  ### Local Gradio app
41
+
42
  ```bash
43
  python app.py
44
  ```
45
+
46
  Visit `http://127.0.0.1:7860` and either upload an image or choose one of the curated examples. Ensure the selected grid size divides the target image size (e.g., 512px image with 32×32 grid) for best results.
47
 
48
  ### Command-line benchmarking
49
+
50
  The easiest way to reproduce the profiling numbers is to run the Performance Benchmark tab once. The first pass warms the tile cache; subsequent runs deliver the <10ms timings shown in the notebook.
51
 
52
  ## Deployed Demo
53
+
54
  The project is available as a Hugging Face Space: [ImageMosaicGenerator](https://huggingface.co/spaces/meryadri/ImageMosaicGenerator). The space automatically stays in sync with this repository.
55
 
56
  ## Profiling Report
57
+
58
  See [`profiling_analysis.ipynb`](profiling_analysis.ipynb) for:
59
+
60
  - benchmark data (before/after speedups)
61
  - cProfile summaries & line-profiler excerpts
62
  - discussion of optimized bottlenecks (tile caching, vectorized grid processing, preprocessing reuse)
63
 
64
  ## Contributing
65
+
66
  1. Fork the repository and open a feature branch.
67
  2. Run `python app.py` and ensure both Gradio tabs still function.
68
  3. Update the profiling notebook or README if your change affects performance.
69
  4. Submit a pull request with a brief summary of the improvement.
70
 
71
  ## License
72
+
73
  This project inherits the usage terms of the Hugging Face Space it powers. Refer to the Space card for additional information.