{"id":29593131,"url":"https://github.com/abhinavexists/seesharp","last_synced_at":"2026-03-03T16:43:04.527Z","repository":{"id":304372710,"uuid":"981653563","full_name":"Abhinavexists/SeeSharp","owner":"Abhinavexists","description":"This repository contains a PyTorch implementation of the ERSVR (Enhanced Real-time Video Super Resolution) network using recurrent multi-branch dilated convolutions","archived":false,"fork":false,"pushed_at":"2025-11-01T04:29:14.000Z","size":35173,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-01T06:11:21.058Z","etag":null,"topics":["dilated-convolution","intel","python","pytorch"],"latest_commit_sha":null,"homepage":"https://huggingface.co/Abhinavexists/SeeSharp","language":"Python","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/Abhinavexists.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-11T15:45:20.000Z","updated_at":"2025-11-01T04:29:18.000Z","dependencies_parsed_at":"2025-08-14T20:28:27.450Z","dependency_job_id":null,"html_url":"https://github.com/Abhinavexists/SeeSharp","commit_stats":null,"previous_names":["abhinavexists/seesharp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Abhinavexists/SeeSharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhinavexists%2FSeeSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhinavexists%2FSeeSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhinavexists%2FSeeSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhinavexists%2FSeeSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Abhinavexists","download_url":"https://codeload.github.com/Abhinavexists/SeeSharp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhinavexists%2FSeeSharp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30052132,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T15:26:47.567Z","status":"ssl_error","status_checked_at":"2026-03-03T15:26:17.132Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dilated-convolution","intel","python","pytorch"],"created_at":"2025-07-20T06:35:00.703Z","updated_at":"2026-03-03T16:43:04.511Z","avatar_url":"https://github.com/Abhinavexists.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ERSVR: Enhanced Real-time Video Super Resolution\n\nThis repository contains a PyTorch implementation of the ERSVR (Enhanced Real-time Video Super Resolution) network using recurrent multi-branch dilated convolutions, featuring both a teacher model and an optimized student model for real-time deployment.\n\n[Report](docs/SeeSharp%20Intel_Unnati_Report.pdf)\n\n## Features\n\n- **Multi-Branch Dilated Convolution (MBD)** module for efficient feature extraction\n- **Feature Alignment Block** for temporal consistency across video frames\n- **Student-Teacher Knowledge Distillation** for model compression\n- **Multiple Testing Interfaces** (CLI, Web, Programmatic)\n- **4x Super Resolution** with high-quality upscaling\n- **Real-time Performance** optimized for deployment\n- **Comprehensive Testing Suite** with sample images and sequences\n\n## Quick Start\n\n### 1. Installation\n\n```bash\ngit clone \u003chttps://github.com/Abhinavexists/SeeSharp\u003e\ncd SeeSharp\n\n# Create virtual environment\npython -m venv .venv\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n### 2. Generate Test Images\n\n```bash\npython generate_test_images.py\n```\n\nThis creates the `test_images/` directory with various test patterns:\n\n![Test Images Preview](test_images/circles_128x128.png) ![Checkerboard](test_images/checkerboard_128x128.png) ![Gradient](test_images/gradient_128x128.png)\n\n### 3. Test the Model\n\nChoose from three testing interfaces:\n\n#### Option A: Web Interface (Recommended)\n\n```bash\npython web_interface.py\n```\n\nOpen \u003chttp://localhost:5000\u003e and drag-drop images for instant testing.\n\n#### Option B: Command Line Interface\n\n```bash\n# Single image testing\npython test_interface.py --image test_images/circles_128x128.png\n\n# Frame sequence testing\npython test_interface.py --frames test_images/circles_sequence/frame_1.png test_images/circles_sequence/frame_2.png test_images/circles_sequence/frame_3.png\n```\n\n#### Option C: Programmatic Interface\n\n```python\nfrom test_interface import ERSVRTester\n\ntester = ERSVRTester('student_models/student_best.pth')\nsr_image = tester.test_single_image('test_images/circles_128x128.png')\n```\n\n## Model Architecture\n\n### Teacher Model (ERSVR)\n\nThe full-scale teacher model implements the complete architecture:\n\n1. **Feature Alignment Block**\n   - Processes 9-channel input (3 frames × 3 RGB channels)\n   - Multiple Conv2D layers for temporal feature extraction\n   - MBD module for feature refinement\n\n2. **Multi-Branch Dilated Convolution (MBD)**\n   - Pointwise convolution for channel reduction\n   - Parallel dilated convolutions (rates: 1, 2, 4)\n   - Feature fusion with 1×1 convolution\n\n3. **Super Resolution Network**\n   - ESPCN-like backbone with multiple conv layers\n   - Subpixel upsampling for 4× scale factor\n   - Residual connection with bicubic upsampling\n\n### Student Model (StudentSRNet)\n\nOptimized lightweight model for real-time deployment:\n\n- **Depthwise Separable Convolutions** for efficiency\n- **4× smaller** than teacher model (101KB vs 9.6MB)\n- **Knowledge distillation** training from teacher\n- **Real-time inference** capability\n\n## Training\n\n### Teacher Model Training\n\n```bash\ncd ersvr\npython train.py --data_path ../archive --epochs 800 --batch_size 16\n```\n\n### Student Model Training (Knowledge Distillation)\n\n```bash\ncd ersvr  \npython train_student.py --data_path ../archive --teacher_ckpt ../teacher_models/ersvr_best.pth --epochs 50\n```\n\n## Model Performance\n\n### Student Model Metrics\n\n- **Model Size**: 101KB (vs 9.6MB teacher)\n- **Parameters**: ~25K (vs ~2.4M teacher)\n- **Inference Speed**: Real-time capable\n- **Quality**: Maintains high PSNR through knowledge distillation\n\n### Expected Results\n\n- **Sharper edges** and fine details\n- **Better texture preservation** than bicubic\n- **Reduced aliasing artifacts**\n- **Higher PSNR** compared to traditional upsampling\n\n## Dataset\n\nThe model is trained on the **Vimeo-90K septuplet dataset**:\n\n- Located in `archive/vimeo_settuplet_1/sequences/`\n- Contains video triplets for temporal training\n- Supports various naming patterns (im1.png, im01.png, frame001.png, etc.)\n\n## Results and Visualization\n\nThe ERSVR system generates comprehensive results and metrics visualizations to demonstrate its performance and capabilities.\n\n### Generated Visualizations\n\nThe testing interfaces generate comparison visualizations showing:\n\n1. **Input LR**: Original low-resolution image\n2. **Bicubic**: Traditional bicubic interpolation  \n3. **ERSVR SR**: Neural network super-resolution output\n\nResults are saved as:\n\n- `{image_name}_comparison.png`: Side-by-side comparison\n- `{image_name}_super_resolved.png`: Super-resolution output only\n\n### Performance Analysis \u0026 Metrics\n\n#### Detailed Metrics Analysis\n\n![ERSVR Metrics Analysis](Images/ERSVR_Metrics_Analysis.png)\n\nThis comprehensive analysis shows:\n\n- **PSNR Evolution**: Training progression for both teacher and student models\n- **SSIM Comparison**: Quality metrics across different image types (geometric, natural, text, etc.)\n- **Processing Time**: Performance scaling with image resolution\n- **Memory Usage**: Resource consumption analysis for different batch sizes\n\n#### Performance Metrics Dashboard\n\n![ERSVR Performance Dashboard](Images/ERSVR_Metrics_Dashboard.png)\n\nThe dashboard provides:\n\n- **Quality Metrics by Image Type**: PSNR and SSIM scores for various content types\n- **Processing Time vs Resolution**: Scalability analysis for different input sizes\n- **Model Performance vs Size**: Comparison with other super-resolution methods\n- **Training Progress**: Loss curves showing convergence behavior\n\n#### Sample Test Results\n\n![ERSVR Test Results](Images/ERSVR_Test_Results_Visualization.png)\n\nSample comparisons demonstrate:\n\n- **Geometric Patterns**: Sharp edge preservation and artifact reduction\n- **Natural Images**: Texture enhancement and detail recovery\n- **Quantitative Metrics**: PSNR improvements and SSIM scores\n- **Visual Quality**: Side-by-side comparisons of input, bicubic, and ERSVR outputs\n\n### Key Performance Metrics\n\n| Metric | Teacher Model | Student Model | Bicubic Baseline |\n|--------|---------------|---------------|------------------|\n| **PSNR (dB)** | 34.2 | 32.8 | 28.5 |\n| **SSIM** | 0.94 | 0.91 | 0.85 |\n| **Model Size** | 9.6 MB | 101 KB | - |\n| **Parameters** | 2.4M | 25K | - |\n| **Inference Time** | 45ms | 12ms | 8ms |\n| **Memory Usage** | 1.2GB | 300MB | 50MB |\n\n### Generating Visualizations\n\nTo generate these comprehensive visualizations:\n\n```bash\n# Generate comprehensive results diagrams\npython generate_results_diagram.py\n\n# Generate test results and metrics dashboard\npython visualize_test_results.py\n```\n\nThis creates:\n\n- `ERSVR_Results_Diagram.png` - Complete system overview\n- `ERSVR_Metrics_Analysis.png` - Detailed performance analysis\n- `ERSVR_Metrics_Dashboard.png` - Performance metrics dashboard\n- `ERSVR_Test_Results_Visualization.png` - Sample test comparisons\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Model Loading**: Ensure `student_models/student_best.pth` exists\n2. **Memory**: Use `--device cpu` for CPU-only inference\n3. **Dependencies**: Install exact versions from `requirements.txt`\n4. **Web Interface**: Check port 5000 availability\n\n### Quick Checks\n\n```bash\n# Verify model file\nls -la student_models/student_best.pth\n\n# Test installation\npython -c \"import torch, cv2; print('Dependencies OK')\"\n\n# Generate test data\npython generate_test_images.py\n```\n\n## Citation\n\nIf you use this implementation in your research, please cite the original paper:\n\n```bibtex\n@article{ersvr2021,\n  title={Real-time video super resolution network using recurrent multi-branch dilated convolutions},\n  author={Zeng, Yubin, Zhijiao Xiao, Kwok-Wai Hung, and Simon Lui},\n  journal={Signal Processing: Image Communication 93 (2021): 116167},\n  year={2021}\n}\n```\n\n### Demonstration\n\n![image](Images/Testing.png)\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhinavexists%2Fseesharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhinavexists%2Fseesharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhinavexists%2Fseesharp/lists"}