{"id":29793155,"url":"https://github.com/bhuvan2018/enhancing_image_clarity_denoising_autoencoder","last_synced_at":"2026-04-09T12:33:43.950Z","repository":{"id":305135628,"uuid":"1022029969","full_name":"bhuvan2018/Enhancing_Image_Clarity_Denoising_Autoencoder","owner":"bhuvan2018","description":"A lightweight Flask web application that performs real-time face image deblurring using a custom CBAM-enhanced U-Net model served via TensorFlow. It includes intelligent image enhancement, PSNR/SSIM/MAE/MSE metrics, and a clean UI to visualize deblurred results. Optimized for both mobile \u0026 desktop images, by restoring image clarity.","archived":false,"fork":false,"pushed_at":"2025-07-18T14:15:58.000Z","size":51615,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-18T14:33:19.026Z","etag":null,"topics":["daisyui","docker","flask","lenis","python","tensorflow","threejs"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bhuvan2018.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-18T10:35:49.000Z","updated_at":"2025-07-18T14:16:01.000Z","dependencies_parsed_at":"2025-07-18T14:52:56.827Z","dependency_job_id":null,"html_url":"https://github.com/bhuvan2018/Enhancing_Image_Clarity_Denoising_Autoencoder","commit_stats":null,"previous_names":["bhuvan2018/enhancing_image_clarity_denoising_autoencoder"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/bhuvan2018/Enhancing_Image_Clarity_Denoising_Autoencoder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhuvan2018%2FEnhancing_Image_Clarity_Denoising_Autoencoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhuvan2018%2FEnhancing_Image_Clarity_Denoising_Autoencoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhuvan2018%2FEnhancing_Image_Clarity_Denoising_Autoencoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhuvan2018%2FEnhancing_Image_Clarity_Denoising_Autoencoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhuvan2018","download_url":"https://codeload.github.com/bhuvan2018/Enhancing_Image_Clarity_Denoising_Autoencoder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhuvan2018%2FEnhancing_Image_Clarity_Denoising_Autoencoder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267451489,"owners_count":24089312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["daisyui","docker","flask","lenis","python","tensorflow","threejs"],"created_at":"2025-07-28T02:09:00.976Z","updated_at":"2025-12-30T21:57:29.085Z","avatar_url":"https://github.com/bhuvan2018.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Face Deblurring Web App 🚀\n\nA deep learning-powered web application to **restore low-quality or blurred face images** using a **CBAM-enhanced U-Net** architecture. The system performs intelligent image enhancement through CLAHE, denoising, and unsharp masking — and provides detailed evaluation metrics including PSNR, SSIM, MAE, and MSE.\n\n---\n\n## 🔍 Key Features\n\n- 📤 Upload blurry face images (e.g., selfies, low-light portraits)\n- 🧪 Preprocessing pipeline with:\n  - CLAHE (Contrast Limited Adaptive Histogram Equalization)\n  - FastNlMeansDenoisingColored (light denoising)\n  - Unsharp masking\n  - Adaptive sharpness \u0026 contrast adjustment\n- 🧠 Real-time deblurring with **TensorFlow SavedModel** via `TFSMLayer`\n- 📊 Metrics Visualization:\n  - PSNR (Peak Signal-to-Noise Ratio)\n  - SSIM (Structural Similarity Index)\n  - MAE, MSE\n  - Noise Difference Histogram (Intensity Loss vs. Enhancement)\n- 📥 CSV log export of image metrics\n- 🌐 Web UI with:\n  - Landing page (`/`)\n  - Deblurring interface (`/in`)\n- 💻 Frontend stack: **Three.js**, **Daisy UI**, **Lenis UI**\n\n---\n\n## 🧠 Model Overview\n\n- **Architecture:** U-Net with CBAM (Convolutional Block Attention Module)\n- **Loss Function:** Perceptual + Pixel Loss (Multi-Scale)\n- **Input/Output Size:** 128 × 128\n- **Trained On:** Human face datasets with synthetic blur (Gaussian + Motion)\n- **Deployment Format:** TensorFlow SavedModel (`autoencoder_model/`)\n\n---\n\n## 🚀 Getting Started\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/bhuvan2018/Enhancing_Image_Clarity_Denoising_Autoencoder.git\ncd Enhancing_Image_Clarity_Denoising_Autoencoder\n````\n\n### 2. Install Dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n### 3. Project Structure\n\n```\n├── app.py                     # Flask backend\n├── autoencoder_model/         # Trained TensorFlow SavedModel\n├── nginx/\n│   ├── default.conf\n├── templates/\n│   ├── home.html              # Landing page\n│   └── index.html             # Deblurring interface\n├── static/\n│   ├── css/\n│     ├── styles.css\n│   ├── js/\n│     ├── script.js\n├── docker-compose.yml\n├── Dockerfile\n├── render.yaml\n├── requirements.txt          \n├── metrics_log.csv            # Metrics log for processed images\n└── README.md\n```\n\n### 4. Run Locally\n\n#### Option A: Run Locally\n\n```bash\npython app.py\n```\n\nOpen in browser:\n\n* `http://127.0.0.1:5000/` → Home\n* `http://127.0.0.1:5000/in` → Deblurring UI\n\n#### Option B: Run with Docker\n1. Build the Docker Image:\n\n```bash\ndocker build -t face-deblurring-app .\n```\n\n2. Run the Container\n\n```bash\ndocker run -d -p 5000:5000 face-deblurring-app\n```\nOpen in browser:\n\n* `http://localhost:5000/` → Home\n* `http://localhost:5000/in` → Deblurring UI\n\n---\n\n\n\n## 📊 Sample Output Metrics\n\n| Image        | PSNR (dB) | SSIM | MAE   | MSE    |\n| ------------ | --------- | ---- | ----- | ------ |\n| `blur1.jpg`  | 27.42     | 0.86 | 0.031 | 0.0021 |\n| `blur2.jpg`  | 28.13     | 0.88 | 0.028 | 0.0017 |\n| `mobile.jpg` | 25.60     | 0.75 | 0.045 | 0.0034 |\n\n---\n\n## 📦 Deployment\n\n\u003e ⚙️ Deployment via **Docker**\n\n---\n\n## 📁 Dataset \u0026 Training Details\n\n* **Dataset Used:** CelebA Faces + Human Faces Dataset\n* **Blur Types:** Randomized Gaussian and Motion Blur (synthetically added)\n* **Training Pipeline:**\n\n  * CBAM-enhanced U-Net\n  * Perceptual + Pixel loss (multi-scale)\n  * Trained using 128×128 face crops\n\n---\n\n## 🙋‍♂️ Author\n\n**Bhuvan Shetty**\n📧 \\[[bhuvanshetty2018@gmail.com](mailto:bhuvanshetty2018@gmail.com)]\nBuilt with ❤️ using Flask, TensorFlow, Three.js, DaisyUI \u0026 Lenis\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhuvan2018%2Fenhancing_image_clarity_denoising_autoencoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhuvan2018%2Fenhancing_image_clarity_denoising_autoencoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhuvan2018%2Fenhancing_image_clarity_denoising_autoencoder/lists"}