{"id":13412002,"url":"https://github.com/alex-damian/pulse","last_synced_at":"2025-03-14T17:31:34.149Z","repository":{"id":39374410,"uuid":"265645902","full_name":"adamian98/pulse","owner":"adamian98","description":"PULSE: Self-Supervised Photo Upsampling via Latent Space Exploration of Generative Models","archived":false,"fork":false,"pushed_at":"2021-04-30T11:50:25.000Z","size":168379,"stargazers_count":7757,"open_issues_count":61,"forks_count":1494,"subscribers_count":228,"default_branch":"master","last_synced_at":"2024-07-31T20:49:35.257Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/adamian98.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}},"created_at":"2020-05-20T17:58:16.000Z","updated_at":"2024-07-31T09:34:34.000Z","dependencies_parsed_at":"2022-07-12T17:53:24.170Z","dependency_job_id":null,"html_url":"https://github.com/adamian98/pulse","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/adamian98%2Fpulse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamian98%2Fpulse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamian98%2Fpulse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamian98%2Fpulse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamian98","download_url":"https://codeload.github.com/adamian98/pulse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221490626,"owners_count":16831617,"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":[],"created_at":"2024-07-30T20:01:20.000Z","updated_at":"2025-03-14T17:31:28.629Z","avatar_url":"https://github.com/adamian98.png","language":"Python","funding_links":[],"categories":["Python","好玩项目"],"sub_categories":["黑科技"],"readme":"# PULSE: Self-Supervised Photo Upsampling via Latent Space Exploration of Generative Models\nCode accompanying CVPR'20 paper of the same title. Paper link: https://arxiv.org/pdf/2003.03808.pdf\n\n## NOTE\n\nWe have noticed a lot of concern that PULSE will be used to identify individuals whose faces have been blurred out. We want to emphasize that this is impossible - **PULSE makes imaginary faces of people who do not exist, which should not be confused for real people.** It will **not** help identify or reconstruct the original image.\n\nWe also want to address concerns of bias in PULSE. **We have now included a new section in the [paper](https://arxiv.org/pdf/2003.03808.pdf) and an accompanying model card directly addressing this bias.**\n\n---\n\n![Transformation Preview](./readme_resources/014.jpeg)\n![Transformation Preview](./readme_resources/034.jpeg)\n![Transformation Preview](./readme_resources/094.jpeg)\n\nTable of Contents\n=================\n- [PULSE: Self-Supervised Photo Upsampling via Latent Space Exploration of Generative Models](#pulse-self-supervised-photo-upsampling-via-latent-space-exploration-of-generative-models)\n- [Table of Contents](#table-of-contents)\n  - [What does it do?](#what-does-it-do)\n  - [Usage](#usage)\n    - [Prereqs](#prereqs)\n    - [Data](#data)\n    - [Applying PULSE](#applying-pulse)\n## What does it do? \nGiven a low-resolution input image, PULSE searches the outputs of a generative model (here, [StyleGAN](https://github.com/NVlabs/stylegan)) for high-resolution images that are perceptually realistic and downscale correctly.\n\n![Transformation Preview](./readme_resources/transformation.gif)\n\n## Usage\n\nThe main file of interest for applying PULSE is `run.py`. A full list of arguments with descriptions can be found in that file; here we describe those relevant to getting started.\n\n### Prereqs\n\nYou will need to install cmake first (required for dlib, which is used for face alignment). Currently the code only works with CUDA installed (and therefore requires an appropriate GPU) and has been tested on Linux and Windows. For the full set of required Python packages, create a Conda environment from the provided YAML, e.g.\n\n```\nconda create -f pulse.yml \n```\nor (Anaconda on Windows):\n```\nconda env create -n pulse -f pulse.yml\nconda activate pulse\n```\n\nIn some environments (e.g. on Windows), you may have to edit the pulse.yml to remove the version specific hash on each dependency and remove any dependency that still throws an error after running ```conda env create...``` (such as readline)\n```\ndependencies\n  - blas=1.0=mkl\n  ...\n```\nto\n```\ndependencies\n  - blas=1.0\n ...\n```\n\nFinally, you will need an internet connection the first time you run the code as it will automatically download the relevant pretrained model from Google Drive (if it has already been downloaded, it will use the local copy). In the event that the public Google Drive is out of capacity, add the files to your own Google Drive instead; get the share URL and replace the ID in the https://drive.google.com/uc?=ID links in ```align_face.py``` and ```PULSE.py``` with the new file ids from the share URL given by your own Drive file.\n \n\n### Data\n\nBy default, input data for `run.py` should be placed in `./input/` (though this can be modified). However, this assumes faces have already been aligned and downscaled. If you have data that is not already in this form, place it in `realpics` and run `align_face.py` which will automatically do this for you. (Again, all directories can be changed by command line arguments if more convenient.) You will at this stage pic a downscaling factor. \n\nNote that if your data begins at a low resolution already, downscaling it further will retain very little information. In this case, you may wish to bicubically upsample (usually, to 1024x1024) and allow `align_face.py` to downscale for you.  \n\n### Applying PULSE\nOnce your data is appropriately formatted, all you need to do is\n```\npython run.py\n```\nEnjoy!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-damian%2Fpulse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falex-damian%2Fpulse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-damian%2Fpulse/lists"}