-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
taoming
committed
Jan 22, 2022
1 parent
11d0098
commit 997f2c4
Showing
13 changed files
with
25,042 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,3 +127,6 @@ dmypy.json | |
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
imgs/ | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# 自拍筛选工具 | ||
基于深度学习颜值评分进行自拍照片筛选,灵感来源:看到[@小众软件 转发的 @睡到人间吃饭时 的微博](https://weibo.com/1684197391/Lb0ggA0rK?type=comment) | ||
|
||
## 原理 | ||
使用ResNet18模型对文件夹中的每张照片进行评分,排序后将分数最高的n张复制到目标文件夹中。 | ||
|
||
模型来源:[CharlesPikachu/isBeauty](https://github.com/CharlesPikachu/isBeauty) | ||
|
||
部署工具:使用[pnnx](https://github.com/pnnx/pnnx)将PyTorch模型转为[ncnn](https://github.com/Tencent/ncnn) | ||
|
||
若对模型效果不满意,可以自行训练替换`models`目录下的模型,或对配置文件`config.ini`中`model`项的路径进行修改。 | ||
|
||
## 使用方法 | ||
1. 从源代码运行 | ||
首先安装好需要的包 | ||
```bash | ||
$ pip install -r requirements.txt | ||
``` | ||
随后使用python运行`photo_filter.py` | ||
```bash | ||
$ python photo_filter.py | ||
``` | ||
|
||
2. 使用编译好的程序(Windows) | ||
下载[photo_filter_windows_x64.zip](),解压后双击`photo_filter.exe`运行。 | ||
|
||
## 使用效果 | ||
 | ||
|
||
|
||
The emoji graphics are from the open source project [Twemoji](https://twemoji.twitter.com/). The graphics are copyright 2020 Twitter, Inc and other contributors. The graphics are licensed under [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/). You should review the license before usage in your project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[model] | ||
bin=models/model.ncnn.bin | ||
param=models/model.ncnn.param | ||
|
||
[path] | ||
output_path=/home/tommy/code/photo_filter/out | ||
pic_path=/home/tommy/code/photo_filter/imgs |
Oops, something went wrong.