Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Nutlope/restorePhotos
Restoring old and blurry face photos with AI.
https://github.com/Nutlope/restorePhotos
Last synced: 10 days ago
JSON representation
Restoring old and blurry face photos with AI.
- Host: GitHub
- URL: https://github.com/Nutlope/restorePhotos
- Owner: Nutlope
- License: mit
- Created: 2023-01-08T07:05:30.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-20T01:37:57.000Z (5 months ago)
- Last Synced: 2024-10-29T15:10:41.028Z (11 days ago)
- Language: TypeScript
- Homepage: https://www.restorephotos.io/
- Size: 7.38 MB
- Stars: 3,941
- Watchers: 29
- Forks: 608
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - Nutlope/restorePhotos - Restoring old and blurry face photos with AI. (TypeScript)
- awesome-ai-frontend - Face Photo Restorer - Restore old and blurry face photos with AI by [@nutlope](https://github.com/Nutlope) (Community projects (Inspiration))
- stars - Nutlope/restorePhotos - Restoring old and blurry face photos with AI. (TypeScript)
- jimsghstars - Nutlope/restorePhotos - Restoring old and blurry face photos with AI. (TypeScript)
README
# [RestorePhotos.io](https://restorephotos.io/)
This project restores old face photos using AI. Watch the [4 minute explainer video](https://twitter.com/nutlope/status/1614794731396931585) to see how I built this or see the [15 second demo](https://twitter.com/nutlope/status/1612488923716136962).
[![Face Photo Restorer](./public/screenshot.png)](https://restorephotos.io/)
## How it works
It uses an ML model from the Applied Research Center called [GFPGAN](https://github.com/TencentARC/GFPGAN) on [Replicate](https://replicate.com/) to restore face photos. This application gives you the ability to upload any photo, which will send it through this ML Model using a Next.js API route, and return your restored photo.
## Running Locally
Note: I just added auth so these steps are not complete as of now. You can git clone from [this specific commit](https://github.com/Nutlope/restorePhotos/tree/1c5c8ac4f52a08f68a3091d3b21be8a65aef71f2).
### Cloning the repository the local machine.
```bash
git clone
```### Creating a account on Replicate to get an API key.
1. Go to [Replicate](https://replicate.com/) to make an account.
2. Click on your profile picture in the top right corner, and click on "Dashboard".
3. Click on "Account" in the navbar. And, here you can find your API token, copy it.### Storing API key in .env file.
Create a file in root directory of project with env. And store your API key in it, as shown in the .example.env file.
If you'd also like to do rate limiting, create an account on UpStash, create a Redis database, and populate the two environment variables in `.env` as well. If you don't want to do rate limiting, you don't need to make any changes.
### Installing the dependencies.
```bash
npm install
```### Running the application.
Then, run the application in the command line and it will be available at `http://localhost:3000`.
```bash
npm run dev
```## One-Click Deploy
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples):
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/Nutlope/restorePhotos&env=REPLICATE_API_KEY&project-name=face-photo-restorer&repo-name=restore-photos)
## Powered by
This example is powered by the following services:
- [Replicate](https://replicate.com) (AI API)
- [Bytescale](https://www.bytescale.com/) (storage + image processing API)
- [Vercel](https://vercel.com) (hosting, serverless functions, analytics)
- [Auth.js](https://authjs.dev/) + [Neon](https://neon.tech/) (auth + DB)
- [Upstash](https://upstash.com/) Redis (rate limiting)