{"id":21326683,"url":"https://github.com/jaypmorgan/cloud-removal","last_synced_at":"2025-03-16T00:11:02.730Z","repository":{"id":169350726,"uuid":"606062431","full_name":"jaypmorgan/cloud-removal","owner":"jaypmorgan","description":"Remove cloud shadows from ground-based observations","archived":false,"fork":false,"pushed_at":"2023-12-11T11:43:09.000Z","size":533,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T12:45:21.976Z","etag":null,"topics":["astrophysics","computer-vision","deep-learning","heliophysics","machine-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaypmorgan.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}},"created_at":"2023-02-24T14:11:37.000Z","updated_at":"2024-10-03T11:59:23.000Z","dependencies_parsed_at":"2023-12-11T13:19:37.568Z","dependency_job_id":null,"html_url":"https://github.com/jaypmorgan/cloud-removal","commit_stats":null,"previous_names":["jaypmorgan/cloud-removal"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaypmorgan%2Fcloud-removal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaypmorgan%2Fcloud-removal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaypmorgan%2Fcloud-removal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaypmorgan%2Fcloud-removal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaypmorgan","download_url":"https://codeload.github.com/jaypmorgan/cloud-removal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806070,"owners_count":20350775,"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":["astrophysics","computer-vision","deep-learning","heliophysics","machine-learning"],"created_at":"2024-11-21T21:10:41.739Z","updated_at":"2025-03-16T00:11:02.705Z","avatar_url":"https://github.com/jaypmorgan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"./images/overview.png\" width=\"700px\"\u003e\u003c/p\u003e\n\n# Removal of Cloud Shadows from Ground-based Solar Imagary with Deep Learning\n\nDeep Neural Networks for the removal of cloud contamination in\nground-based observations. These codes were presented in the article\n'Removing cloud shadows from ground-based solar imagery, Chaoui et\nal.'\n\n## Install\n\nYou can pip install directly from this github repo:\n\n```bash\npip install git+https://github.com/jaypmorgan/cloud-removal.git\n```\n\nor if you've cloned the repo to a local directory:\n\n```bash\ncd cloudremoval\npip install ./\n```\n\n## Usage\n\nUsing the existing synthetic clouds dataset:\n\n```python\nimport dfp\nfrom cloudremoval.dataset import SyntheticClouds, CloudsTransform\n\n# download the data\ndataset = SyntheticClouds(download=True)\n\n# get only a single wavelength from the data\ncaii = dataset.filter(lambda row: dfp.has_props(row, {\"type\": \"Ca II\"}))\n\n# split into train and test\ntrain, test = caii.split(lambda row: dfp.has_props(row, {\"subset\": \"train\"}))\n\n# get the first instance:\nitem = train[0]\ninp1 = item.input\nitem.target\nitem.mask\n\n# Add a transform\ntrain.transform = CloudsTransform(hflip_p=0.5, vflip_p=0.5)\nitem = train[0]\ninp2 = item.input\n```\n\nTo create a model, or load one using existing model weights:\n\n```python\nfrom cloudremoval.model import CloudRemover\n\n# create a new model from scratch (i.e. random model weights)\nmodel = CloudRemover()\n\n# create a model using the existing weights\nmodel = CloudRemover(pretrained=True)\n\n# create a model using a different wavelength\nmodel = CloudRemover(wavelength=\"H-alpha\", pretrained=True)\n\n# test making of predictions\ndataset = SyntheticClouds(download=True, transform=CloudsTransform())\nmodel = CloudRemover(pretrained=True)\nout = model(dataset[0].input[None,...])*dataset[0].mask[None,...]\n\nimport matplotlib.pyplot as plt\nplt.imshow(out[0,0].detach().cpu().numpy(), cmap=\"Greys_r\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaypmorgan%2Fcloud-removal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaypmorgan%2Fcloud-removal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaypmorgan%2Fcloud-removal/lists"}