[![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
After cloning the repo, go to [Replicate](https://replicate.com/) to make an account and put your API key in a file called `.env`. 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.
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)
## Future Tasks
- [ ] Implement a dynamic share page
- [ ] Create a hash and store it in redis along with links to the old and new photos
- [ ] With this new hash, create a new sharable dynamic page that has the photos side by side
- [ ] Use Vercel OG to dynamically generate an OG card that contains the old and new pics side by side
- [ ] Add toggle to be able to restore both face photos or just old blurry photos using swinr model
- [ ] Improve the generation of the photo to extend beyond faces; maybe run it through a general model before
- [ ] Add a carousel of good examples to the index page
没有合适的资源?快使用搜索试试~ 我知道了~
还原旧照片:AI修护旧照片
共41个文件
tsx:12个
jpg:6个
png:6个
需积分: 11 2 下载量 62 浏览量
2023-01-11
23:16:30
上传
评论
收藏 2.68MB ZIP 举报
温馨提示
使用 Next.js API 路由通过此 ML 模型发送照片,并返回恢复的照片。
资源推荐
资源详情
资源评论
收起资源包目录
restorePhotos-main.zip (41个子文件)
restorePhotos-main
restorePhotos-main
pages
_app.tsx 292B
restore.tsx 7KB
index.tsx 3KB
api
generate.ts 2KB
_document.tsx 1KB
tailwind.config.js 241B
next.config.js 154B
.example.env 112B
styles
loading-dots.module.css 1024B
globals.css 59B
utils
downloadPhoto.ts 589B
appendNewToName.ts 211B
redis.ts 305B
components
CompareSlider.tsx 462B
Header.tsx 915B
Toggle.tsx 2KB
LoadingDots.tsx 500B
Footer.tsx 3KB
SquigglyLines.tsx 1KB
ResizablePanel.tsx 567B
Testimonials.tsx 5KB
package.json 815B
public
vercelLogo.png 43KB
vercel.svg 1KB
malte.jpg 24KB
fawaz.jpg 21KB
himanil.jpg 25KB
rod.jpg 27KB
imageIcon.png 11KB
screenshot.png 1.43MB
sergei.jpg 29KB
favicon.ico 15KB
g.jpg 19KB
restoredbro.png 176KB
originalbro.png 318KB
og-image.png 594KB
package-lock.json 102KB
.gitignore 390B
tsconfig.json 509B
README.md 2KB
postcss.config.js 82B
共 41 条
- 1
资源评论
suli77
- 粉丝: 7936
- 资源: 67
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功