{"id":24841480,"url":"https://github.com/rijoslal/look","last_synced_at":"2025-04-12T10:52:01.747Z","repository":{"id":274161330,"uuid":"913774313","full_name":"RijoSLal/Look","owner":"RijoSLal","description":"Look is a powerful ML tool that upscale satellite images generated using ESRGAN built with TensorFlow Keras \u0026 Fastapi. It ensures high-quality scaling, preserving details and consistency, making images ready for further use or visualization. Ideal for enhancing images while maintaining precision","archived":false,"fork":false,"pushed_at":"2025-01-30T15:32:37.000Z","size":167,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T05:42:06.762Z","etag":null,"topics":["bootstrap5","cv2","fastapi","html-css-javascript","jinja2-templates","python3","tensorflow","tensorflow-hub"],"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/RijoSLal.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}},"created_at":"2025-01-08T10:26:27.000Z","updated_at":"2025-02-22T06:48:08.000Z","dependencies_parsed_at":"2025-01-25T11:29:01.375Z","dependency_job_id":null,"html_url":"https://github.com/RijoSLal/Look","commit_stats":null,"previous_names":["rijoslal/scaly"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RijoSLal%2FLook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RijoSLal%2FLook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RijoSLal%2FLook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RijoSLal%2FLook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RijoSLal","download_url":"https://codeload.github.com/RijoSLal/Look/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248557844,"owners_count":21124165,"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","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":["bootstrap5","cv2","fastapi","html-css-javascript","jinja2-templates","python3","tensorflow","tensorflow-hub"],"created_at":"2025-01-31T07:18:08.534Z","updated_at":"2025-04-12T10:52:01.712Z","avatar_url":"https://github.com/RijoSLal.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Look\nLook is a powerful machine learning tool designed to uplscale satellite images, including infrared (IR), ultraviolet (UV), and visible spectrum images, generated by a ESRGAN built with TensorFlow Keras. Integrated with fastapi, it ensures high-quality scaling while preserving details and consistency, making the images ready for further use or visualization. Look is ideal for enhancing images while maintaining precision\n\n## Features\n\n- Upload infrared (IR), ultraviolet (UV), or visible spectrum images, including satellite imagery and scientific visuals.  \n- Enhance image resolution using the powerful ESRGAN super-resolution model.  \n- Download high-quality, upscaled images with improved clarity and detail.  \n- Experience a sleek, user-friendly web interface built with FastAPI, Jinja2 templates, and custom-styled CSS for seamless interaction.\n\n## Installation\n\nTo set up the project locally, follow these steps:\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/RijoSLal/Look.git\ncd Look\n```\n\n### 2. Install dependencies\n\nMake sure you have a Python environment ready. Then, install the necessary dependencies via `pip`:\n\n```bash\npip install -r requirements.txt\n```\n\n### 3. Set up TensorFlow environment\n\nThe model requires TensorFlow to run. Ensure your system is equipped with the appropriate version of TensorFlow and has GPU support for faster inference (optional). If you're using a CPU-only environment, set the environment variable `CUDA_VISIBLE_DEVICES=-1` to avoid GPU usage.\n\n### 4. Download the ESRGAN Model\n\nThis application uses the ESRGAN model from TensorFlow Hub:\n\n- **Model URL**: [ESRGAN TF2 Model](https://tfhub.dev/captain-pool/esrgan-tf2/1)\n\nNo manual download is necessary, as the model is loaded directly from TensorFlow Hub.\nTry building from scratch if you have powerful GPU like 3050 or above.\n\n## Usage\n\n### 1. Run the FastAPI server\n\nTo launch the FastAPI server, use the following command:\n\n```bash\nuvicorn main:app --reload\n```\n\nThe server will be accessible at `http://localhost:8000`.\n\n### 2. Upload an Image\n\nOnce the server is running, navigate to the home page and upload an image. The image must be in a supported format (e.g., `.jpg`, `.jpeg`, `.png`). The image will then be processed by the ESRGAN model to generate the enhanced version.\n\n### 3. Download the Upscaled Image\n\nAfter the image is processed, a download link for the upscaled image will be provided on the same page. You can download the enhanced image in JPEG format.\n\n## API Endpoints\n\n### `/`\n\n- **Method**: `GET`\n- **Description**: Renders the home page with a file upload form for image submission.\n\n### `/upload`\n\n- **Method**: `POST`\n- **Description**: Accepts an image file, processes it with the ESRGAN model, and returns the URL of the upscaled image for download.\n- **Parameters**: \n  - `file` (image file, required)\n\n### `/download`\n\n- **Method**: `GET`\n- **Description**: Provides a download link for the upscaled image if it exists.\n- **Response**: The upscaled image file (JPEG format).\n\n## Project Structure\n\n```\n.\n├── main.py                  # FastAPI application and route definitions\n├── model_gan.py             # GAN model handling and image processing logic\n├── static/                  # Directory for storing uploaded and upscaled images\n│   ├── image/               # Directory for images\n│   │   ├── unclear_image.jpeg   # Example of uploaded image\n│   │   └── super_resolution.jpeg # Upscaled image\n│   └── styling/             # Directory for CSS and styling resources\n│       └── style.css        # Custom styling for the web interface\n├── templates/               # Jinja2 HTML templates\n│   └── index.html           # Main page template\n├── requirements.txt         # List of dependencies\n└── README.md                # Project overview and instructions\n```\n\n## Dependencies\n\n- **FastAPI**: Web framework for building APIs with Python 3.7+.\n- **Uvicorn**: ASGI server to run the FastAPI application.\n- **TensorFlow**: Machine learning framework for building and deploying models.\n- **TensorFlow Hub**: Pre-trained model repository used to load ESRGAN.\n- **Pillow (PIL)**: Image processing library for saving and manipulating images.\n- **Jinja2**: Template engine for rendering HTML views.\n\nTo install all dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n### Optional: TensorFlow GPU Support\n\nIf you have a compatible GPU and want to enable TensorFlow GPU acceleration, ensure you have the necessary CUDA and cuDNN libraries installed. Set the environment variable `CUDA_VISIBLE_DEVICES=0` for GPU usage. If you prefer to use the CPU, set `CUDA_VISIBLE_DEVICES=-1`.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n\n## Acknowledgements\n\n- [TensorFlow Hub](https://www.tensorflow.org/hub) for the pre-trained ESRGAN model.\n- [FastAPI](https://fastapi.tiangolo.com/) for building the API server.\n- [Uvicorn](https://www.uvicorn.org/) for the ASGI server.\n- [Pillow](https://pillow.readthedocs.io/en/stable/) for image handling.\n\nThis application is designed to be a robust, efficient, and scalable solution for processing images with state-of-the-art deep learning model, and is intended for use cases where high-quality image enhancement is needed.Feel free to play around with it and experiment!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frijoslal%2Flook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frijoslal%2Flook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frijoslal%2Flook/lists"}