{"id":13399961,"url":"https://github.com/xiaoyu258/GeoProj","last_synced_at":"2025-03-14T04:32:25.740Z","repository":{"id":45894983,"uuid":"204923250","full_name":"xiaoyu258/GeoProj","owner":"xiaoyu258","description":"Blind Geometric Distortion Correction on Images Through Deep Learning","archived":false,"fork":false,"pushed_at":"2022-09-28T08:15:08.000Z","size":841,"stargazers_count":177,"open_issues_count":11,"forks_count":51,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-07-31T19:22:51.485Z","etag":null,"topics":["deep-learning","distortion-correction","pytorch"],"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/xiaoyu258.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}},"created_at":"2019-08-28T12:11:11.000Z","updated_at":"2024-07-25T06:36:18.000Z","dependencies_parsed_at":"2023-01-18T18:17:23.550Z","dependency_job_id":null,"html_url":"https://github.com/xiaoyu258/GeoProj","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoyu258%2FGeoProj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoyu258%2FGeoProj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoyu258%2FGeoProj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoyu258%2FGeoProj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiaoyu258","download_url":"https://codeload.github.com/xiaoyu258/GeoProj/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243526885,"owners_count":20305109,"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":["deep-learning","distortion-correction","pytorch"],"created_at":"2024-07-30T19:00:45.639Z","updated_at":"2025-03-14T04:32:20.706Z","avatar_url":"https://github.com/xiaoyu258.png","language":"Python","funding_links":[],"categories":["Image Distortion Correction"],"sub_categories":[],"readme":"# GeoProj\n\n### [Paper](https://arxiv.org/abs/1909.03459)\n\nThe source code of Blind Geometric Distortion Correction on Images Through Deep Learning by Li et al, CVPR 2019. \n\n\u003cimg src='imgs/results.jpg' align=\"center\" width=850\u003e \n\n## Prerequisites\n- Linux or Windows\n- Python 3\n- CPU or NVIDIA GPU + CUDA CuDNN\n\n## Getting Started\n\n### Dataset Generation\nIn order to train the model using the provided code, the data needs to be generated in a certain manner. \n\nYou can use any distortion-free images to generate the dataset. In this paper, we use [Places365-Standard dataset](http://places2.csail.mit.edu/download.html) at the resolution of 512\\*512 as the original non-distorted images to generate the 256\\*256 dataset.\n\nRun the following command for dataset generation:\n```bash\npython data/dataset_generate.py [--sourcedir [PATH]] [--datasetdir [PATH]] \n                                [--trainnum [NUMBER]] [--testnum [NUMBER]]\n\n--sourcedir           Path to original non-distorted images\n--datasetdir          Path to the generated dataset\n--trainnum            Number of generated training samples\n--testnum             Number of generated testing samples\n```\n\n### Training\nRun the following command for help message about optional arguments like learning rate, dataset directory, etc.\n```bash\npython trainNetS.py --h # if you want to train GeoNetS\npython trainNetM.py --h # if you want to train GeoNetM\n```\n\n### Use a Pre-trained Model\nYou can download the pretrained model [here](https://drive.google.com/open?id=1Tdi92IMA-rrX2ozdUMvfiN0jCZY7wIp_).\n\nYou can also use `eval.py` and modify the model path, image path and saved result path to your own directory to generate your own results.\n\n### Resampling\nImport `resample.resampling.rectification` function to resample the distorted image by the forward flow.\n\nThe distorted image should be a Numpy array with the shape of H\\*W\\*3 for a color image or H\\*W for a greyscale image, the forward flow should be an array with the shape of 2\\*H\\*W.\n\nThe function will return the resulting image and a mask to indicate whether each pixel will converge within the maximum iteration.\n## Citation\n```bash\n@inproceedings{li2019blind,\n  title={Blind Geometric Distortion Correction on Images Through Deep Learning},\n  author={Li, Xiaoyu and Zhang, Bo and Sander, Pedro V and Liao, Jing},\n  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},\n  pages={4855--4864},\n  year={2019}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaoyu258%2FGeoProj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiaoyu258%2FGeoProj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaoyu258%2FGeoProj/lists"}