{"id":26138039,"url":"https://github.com/zenitheesc/haze-remover","last_synced_at":"2026-04-25T22:32:37.942Z","repository":{"id":103091566,"uuid":"345197915","full_name":"zenitheesc/haze-remover","owner":"zenitheesc","description":"Computer vision application to remove fog from images captured during probe and satellite missions","archived":false,"fork":false,"pushed_at":"2021-04-28T21:35:33.000Z","size":2508,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-08T16:37:52.391Z","etag":null,"topics":["imaging","opencv","opencv-python","python","vision"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zenitheesc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-03-06T21:21:44.000Z","updated_at":"2021-07-05T16:33:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"6f29ad15-623e-41af-b032-c21598a63da4","html_url":"https://github.com/zenitheesc/haze-remover","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"zenitheesc/new-zenith-template","purl":"pkg:github/zenitheesc/haze-remover","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenitheesc%2Fhaze-remover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenitheesc%2Fhaze-remover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenitheesc%2Fhaze-remover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenitheesc%2Fhaze-remover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zenitheesc","download_url":"https://codeload.github.com/zenitheesc/haze-remover/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenitheesc%2Fhaze-remover/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32279654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: 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":["imaging","opencv","opencv-python","python","vision"],"created_at":"2025-03-11T01:44:37.434Z","updated_at":"2026-04-25T22:32:37.937Z","avatar_url":"https://github.com/zenitheesc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\" style=\"color:white; background-color:black\"\u003eHaze Remover\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eSoftware development to remove fog from images captured during probe missions.\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"http://zenith.eesc.usp.br/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Zenith-Embarcados-black?style=for-the-badge\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://eesc.usp.br/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Linked%20to-EESC--USP-black?style=for-the-badge\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/zenitheesc/Visao/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/zenitheesc/Visao?style=for-the-badge\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/zenitheesc/Visao/issues\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/issues/zenitheesc/Visao?style=for-the-badge\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/zenitheesc/Visao/commits/main\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/commit-activity/m/zenitheesc/Visao?style=for-the-badge\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/zenitheesc/Visao/graphs/contributors\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/contributors/zenitheesc/Visao?style=for-the-badge\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/zenitheesc/Visao/commits/main\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/last-commit/zenitheesc/Visao?style=for-the-badge\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/zenitheesc/Visao/issues\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/issues-raw/zenitheesc/Visao?style=for-the-badge\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/zenitheesc/Visao/pulls\"\u003e\n    \u003cimg src = \"https://img.shields.io/github/issues-pr-raw/zenitheesc/Visao?style=for-the-badge\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"#environment-and-tools\"\u003eEnvironment and Tools\u003c/a\u003e •\n    \u003ca href=\"#steps-to-run-and-debug\"\u003eSteps to run and debug\u003c/a\u003e\n    \u003c!--\u003ca href=\"#how-to-contribute\"\u003eHow to contribute?\u003c/a\u003e •--\u003e\n\u003c/p\u003e\n\n## Environment and tools\n- [Python](https://www.python.org/): ^3.8.5,\n- [Google Maps Static API](https://developers.google.com/maps/documentation/maps-static/overview),\n- [OpenCV](https://opencv.org/): ^4.2.0,\n- [Tensorflow](https://www.tensorflow.org/): ^2.5.0,\n## Steps to run and debug\n\n \nThe first thing you need to do is create a .env file at the root of the project. \n\n```bash\n.\n├── dataset\n│   ├── generate.py\n│   ├── google_mps_api.py\n│   └── __init__.py\n├── error.png\n├── images\n│   ├── clean\n│   ├── hazed\n│   └── originais\n├── LICENSE\n├── main.py\n├── network\n│   ├── haze.py\n│   ├── run.py\n│   └── validation.py\n├── README.md\n└── .env  \u003c---\n\n```\nInside .env file you must add the following line\n\n```\nGOOGLE_API_KEY=\"YOUR_API_KEY\"\n```\nTo generate your google maps api key follow the instructions in https://developers.google.com/maps/documentation/maps-static/overview\n\nAll the code related with the data set generation is located at **dataset** module.\n\nAfter generate and setup your api key, now you can just run the following code at the root of the project directory.\n\n```\npython3 main.py\n```\nThis will generate a certain number of images, half of the images will be clean images and they will be saved at **/images/clean**. The other half will be the hazed images, they will be saved at **/images/hazed** folder. These folders will look like this.\n\n\n**/images/originais** folder\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/zenitheesc/haze-remover/assets/originais_readme.png\"/\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n**/images/clean** folder\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/zenitheesc/haze-remover/assets/clean_readme.png\"/\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n**/images/hazed** folder\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/zenitheesc/haze-remover/assets/hazed_readme.png\"/\u003e\n\u003c/p\u003e\n\nBefore determining the number of images you are going to use, there are a few things you need to know about the code operation.\n\nThe function responsible for downloading images is the **imgDownload** located at **dataset/google_maps_api.py**. This function works by taking a coordinate position and then changing the longitude and latitude values ​​in two **for** loops.\n\n```python\n\nfor latitude in range(0, 15, 1):\n\t\tfor longitude in range (0, 30, 1):\n\n```\nSo the number of images that will be downloaded after call **imgDownload** once are going to be 15*30 = 450 images. But you can change these values depending on your need. So far, these are only the clean images.\n\nAfter downloading the images, the function **generate**, which is responsible for generating the hazed images, will be called. This function is located at **dataset/generate.py**. In addition to generating fog in the images, this function increases the number of images by rotating them 7 times.\n\nThus, the total number of the images after using one coordinate, by calling **imgDownload** once and than **generate**, are going to be 450 * 8 = 3600. Note that, in the **main** function, located at **./main.py**, we are using 13 different coordinates parameters, so we are calling the **imgDownload** function 13 times. If you use all coordinates, your data set will consist of 3600 * 13 = 46800 images in **/images/clean** and another 46800 images in **/images/hazed**. The folder **/images/originais** contains only the images that have been downloaded, they have no transformation.\n\nTo simplify this analysis, use the following formula\n\n```\nnumber_of_clean_images = number_of_hazed_images = range_in_loop * number_of_coordinates * 8\n\nnumber_of_images_in_originais = range_in_loop\n\ntotal = number_of_clean_images + number_of_hazed_images + number_of_images_in_originais\n```\nIn our case\n```\nrange_in_loop = 15 * 30 = 450\nnumber_of_coordinates = 13\n\nnumber_of_clean_images = number_of_hazed_images = 450 * 13 * 8 = 46800\n\nnumber_of_images_in_originais = 450\n\ntotal = 46800 + 46800 + 450 = 94050\n```\n### Using the neural network\nAfter creating your data set, you already can train your neural network. All the code related with the neural network usage is located at **network** folder.\nInside **network** folder you will find 3 files:\n- haze.py -\u003e Responsible for training and saving the neural network model.\n- validation.py -\u003e Responsible for validating the neural network model trained by haze.py, on the data set.\n- run.py -\u003e Take a single image from your local directory and apply the trained neural network. \n\nNote that it may be necessary to change some paths for the files over these 3 files.\nTo run each of the files, you can just access the **network** folder and type\n```bash\npython3 \u003cfile_name.py\u003e\n``` \n\u003c!--- ## How to contribute\n\n`(optional, depends on the project) list of simple rules to help people work on the project.`\n\n`Examples: How to format a pull request\\n How to format an issue` ---\u003e\n\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"http://zenith.eesc.usp.br\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Check%20out-Zenith's Oficial Website-black?style=for-the-badge\" /\u003e\n    \u003c/a\u003e \n    \u003ca href=\"https://www.facebook.com/zenitheesc\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Like%20us%20on-facebook-blue?style=for-the-badge\"/\u003e\n    \u003c/a\u003e \n    \u003ca href=\"https://www.instagram.com/zenith_eesc/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Follow%20us%20on-Instagram-red?style=for-the-badge\"/\u003e\n    \u003c/a\u003e\n\n\u003c/p\u003e\n\u003cp align = \"center\"\u003e\n\u003ca href=\"zenith.eesc@gmail.com\"\u003ezenith.eesc@gmail.com\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenitheesc%2Fhaze-remover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzenitheesc%2Fhaze-remover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenitheesc%2Fhaze-remover/lists"}