Commit
·
033a1c6
1
Parent(s):
4e5cb87
add: dataset
Browse files- README.md +129 -2
- chinese.md +132 -0
- rollei_infrared_400.zip +3 -0
README.md
CHANGED
|
@@ -1,3 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DeepDigitalFilm
|
| 2 |
+
|
| 3 |
+
DigitalFilm: Use a neural network to simulate film style.
|
| 4 |
+
|
| 5 |
---
|
| 6 |
+
|
| 7 |
+
<!-- PROJECT LOGO -->
|
| 8 |
+
<br />
|
| 9 |
+
|
| 10 |
+
<p align="center">
|
| 11 |
+
<a href="./readme.md">
|
| 12 |
+
</a>
|
| 13 |
+
|
| 14 |
+
<h3 align="center">"DigitalFilm" Digital Film</h3>
|
| 15 |
+
<p align="center">
|
| 16 |
+
Use a neural network to simulate film style.
|
| 17 |
+
<br />
|
| 18 |
+
<a href="https://github.com/shaojintian/Best_README_template"><strong>Explore the documentation of this project »</strong></a>
|
| 19 |
+
<br />
|
| 20 |
+
<br />
|
| 21 |
+
<a href="./app/digitalFilm.py">View the demo</a>
|
| 22 |
+
·
|
| 23 |
+
<a href="https://github.com/SongZihui-sudo/digitalFilm/issues">Report a bug</a>
|
| 24 |
+
·
|
| 25 |
+
<a href="https://github.com/SongZihui-sudo/digitalFilm/issues">Propose a new feature</a>
|
| 26 |
+
</p>
|
| 27 |
+
|
| 28 |
+
</p>
|
| 29 |
+
|
| 30 |
+
This README.md is for developers and users
|
| 31 |
+
[简体中文](./chinese.md)
|
| 32 |
+
|
| 33 |
+
[PowerPoint Presentation
|
| 34 |
+
](https://incandescent-salmiakki-063eb6.netlify.app/)
|
| 35 |
+
|
| 36 |
+
[source code](https://github.com/SongZihui-sudo/digitalFilm)
|
| 37 |
+
|
| 38 |
+
## Table of Contents
|
| 39 |
+
|
| 40 |
+
- [DeepDigitalFilm](#deepdigitalfilm)
|
| 41 |
+
- [Table of Contents](#table-of-contents)
|
| 42 |
+
- [Sample](#sample)
|
| 43 |
+
- [Run Demo](#run-demo)
|
| 44 |
+
- [training model](#training-model)
|
| 45 |
+
- [**Installation steps**](#installation-steps)
|
| 46 |
+
- [Overall architecture](#overall-architecture)
|
| 47 |
+
- [Dataset](#dataset)
|
| 48 |
+
- [File directory description](#file-directory-description)
|
| 49 |
+
- [Version Control](#version-control)
|
| 50 |
+
- [Author](#author)
|
| 51 |
+
- [Copyright](#copyright)
|
| 52 |
+
|
| 53 |
+
### Sample
|
| 54 |
+
|
| 55 |
+

|
| 56 |
+
<center style="font-size:14px;color:#C0C0C0;text-decoration:underline">Figure 1 Sample rollei_infrared_400</center>
|
| 57 |
+
|
| 58 |
+

|
| 59 |
+
<center style="font-size:14px;color:#C0C0C0;text-decoration:underline">Figure 2 Sample kodak gold 200</center>
|
| 60 |
+
|
| 61 |
+

|
| 62 |
+
<center style="font-size:14px;color:#C0C0C0;text-decoration:underline">Figure 3 Sample fuji color 200</center>
|
| 63 |
+
|
| 64 |
+
### Run Demo
|
| 65 |
+
|
| 66 |
+
> The length and width of the input photo need to be divisible by **32**.
|
| 67 |
+
|
| 68 |
+
```bash
|
| 69 |
+
python digitalFilm.py [-v/-h/-g] -i <input> -o <ouput> -m <model>
|
| 70 |
+
```
|
| 71 |
+
- -v print version information
|
| 72 |
+
- -h help information
|
| 73 |
+
- -g graphical image selection
|
| 74 |
+
- -i input image directory
|
| 75 |
+
- -o output image directory
|
| 76 |
+
- -m model directory
|
| 77 |
+
|
| 78 |
+
### training model
|
| 79 |
+
|
| 80 |
+
training model directly use cyclegan.ipynb.
|
| 81 |
+
But you need to download the pre-trained model of resnet18 in advance.
|
| 82 |
+
Prepare digital photos and film photos in two folders.
|
| 83 |
+
The model are included in the Release.
|
| 84 |
+
|
| 85 |
+
###### **Installation steps**
|
| 86 |
+
|
| 87 |
+
```sh
|
| 88 |
+
git clone https://github.com/SongZihui-sudo/digitalFilm.git
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
It is best to create an environment in conda now and then install various dependencies.
|
| 92 |
+
|
| 93 |
+
```sh
|
| 94 |
+
pip install -r requirement.txt
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
### Overall architecture
|
| 98 |
+
|
| 99 |
+
Converting digital photos to film style can be regarded as an image style conversion task. Therefore, the overall architecture adopts the cycleGAN network.
|
| 100 |
+
[pytorch-CycleGAN-and-pix2pix](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix)
|
| 101 |
+
In addition, it is difficult to obtain large-scale digital photos and film-style photos, so an unsupervised approach is adopted to use unpaired data for training.
|
| 102 |
+
|
| 103 |
+
### Dataset
|
| 104 |
+
|
| 105 |
+
The dataset consists of dual-source image data, the main part of which is collected from high-quality digital photos taken by Xiaomi 13 Ultra mobile phone, and the rest is selected from professional HDR image dataset.
|
| 106 |
+
Film samples are collected from the Internet.
|
| 107 |
+
|
| 108 |
+
### File directory description
|
| 109 |
+
|
| 110 |
+
- DigitalFilm.ipynb is used to train the model
|
| 111 |
+
- app is a demo
|
| 112 |
+
- digitalFilm.py
|
| 113 |
+
- mynet.py
|
| 114 |
+
- mynet2.py
|
| 115 |
+
|
| 116 |
+
### Version Control
|
| 117 |
+
|
| 118 |
+
This project uses Git for version management. You can view the currently available version in the repository.
|
| 119 |
+
|
| 120 |
+
### Author
|
| 121 |
+
|
| 122 |
+
151122876@qq.com SongZihui-sudo
|
| 123 |
+
|
| 124 |
+
Zhihu:Dr.who   qq:1751122876
|
| 125 |
+
|
| 126 |
+
*You can also view all the developers involved in the project in the list of contributors. *
|
| 127 |
+
|
| 128 |
+
### Copyright
|
| 129 |
+
|
| 130 |
+
This project is licensed under GPLv3. For details, please refer to [LICENSE.txt](./LICENSE.txt)
|
chinese.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DigitalFilm 数字胶卷
|
| 2 |
+
|
| 3 |
+
DigitalFilm:使用神经网络来模拟胶卷风格。
|
| 4 |
+
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
<!-- PROJECT LOGO -->
|
| 8 |
+
<br />
|
| 9 |
+
|
| 10 |
+
<p align="center">
|
| 11 |
+
<a href="./readme.md">
|
| 12 |
+
</a>
|
| 13 |
+
|
| 14 |
+
<h3 align="center">"DigitalFilm" 数字胶卷</h3>
|
| 15 |
+
<p align="center">
|
| 16 |
+
使用一个神经网络来模拟胶卷风格。
|
| 17 |
+
<br />
|
| 18 |
+
<a href="https://github.com/shaojintian/Best_README_template"><strong>探索本项目的文档 »</strong></a>
|
| 19 |
+
<br />
|
| 20 |
+
<br />
|
| 21 |
+
<a href="./app/digitalFilm.py">查看Demo</a>
|
| 22 |
+
·
|
| 23 |
+
<a href="https://github.com/SongZihui-sudo/digitalFilm/issues">报告Bug</a>
|
| 24 |
+
·
|
| 25 |
+
<a href="https://github.com/SongZihui-sudo/digitalFilm/issues">提出新特性</a>
|
| 26 |
+
</p>
|
| 27 |
+
|
| 28 |
+
</p>
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
本篇README.md面向开发者和用户
|
| 32 |
+
[English](./readme.md)
|
| 33 |
+
|
| 34 |
+
[PPT 演示
|
| 35 |
+
](https://incandescent-salmiakki-063eb6.netlify.app/)
|
| 36 |
+
|
| 37 |
+
[源码](https://github.com/SongZihui-sudo/digitalFilm)
|
| 38 |
+
|
| 39 |
+
## 目录
|
| 40 |
+
|
| 41 |
+
- [DigitalFilm 数字胶卷](#digitalfilm-数字胶卷)
|
| 42 |
+
- [目录](#目录)
|
| 43 |
+
- [样片](#样片)
|
| 44 |
+
- [运行 Demo](#运行-demo)
|
| 45 |
+
- [训练模型](#训练模型)
|
| 46 |
+
- [**安装步骤**](#安装步骤)
|
| 47 |
+
- [整体架构](#整体架构)
|
| 48 |
+
- [数据集](#数据集)
|
| 49 |
+
- [文件目录说明](#文件目录说明)
|
| 50 |
+
- [版本控制](#版本控制)
|
| 51 |
+
- [作者](#作者)
|
| 52 |
+
- [版权说明](#版权说明)
|
| 53 |
+
|
| 54 |
+
### 样片
|
| 55 |
+
|
| 56 |
+

|
| 57 |
+
<center style="font-size:14px;color:#C0C0C0;text-decoration:underline">图1 样片rollei_infrared_400</center>
|
| 58 |
+
|
| 59 |
+

|
| 60 |
+
<center style="font-size:14px;color:#C0C0C0;text-decoration:underline">图2 样片 kodak gold 200</center>
|
| 61 |
+
|
| 62 |
+

|
| 63 |
+
<center style="font-size:14px;color:#C0C0C0;text-decoration:underline">图3 样片 fuji color 200</center>
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
### 运行 Demo
|
| 67 |
+
|
| 68 |
+
> 输入照片长和宽需要可以被 **32** 整除。
|
| 69 |
+
|
| 70 |
+
```bash
|
| 71 |
+
python digitalFilm.py [-v/-h/-g] -i <input> -o <ouput> -m <model>
|
| 72 |
+
```
|
| 73 |
+
- -v 打印版本信息
|
| 74 |
+
- -h 帮助信息
|
| 75 |
+
- -g 图形化选择图片
|
| 76 |
+
- -i 输入图片的目录
|
| 77 |
+
- -o 输出图片的目录
|
| 78 |
+
- -m 模型目录
|
| 79 |
+
|
| 80 |
+
### 训练模型
|
| 81 |
+
|
| 82 |
+
训练模型直接使用 cyclegan.ipynb.
|
| 83 |
+
但是要预先下载 resnet18 的预训练模型。
|
| 84 |
+
在两个文件夹内准备好数码照片与胶片照片。
|
| 85 |
+
模型可以在发行版中查看。
|
| 86 |
+
|
| 87 |
+
###### **安装步骤**
|
| 88 |
+
|
| 89 |
+
```sh
|
| 90 |
+
git clone https://github.com/SongZihui-sudo/digitalFilm.git
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
最好现在conda里创建好环境,然后安装各种依赖。
|
| 94 |
+
|
| 95 |
+
```sh
|
| 96 |
+
pip install -r requirement.txt
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
### 整体架构
|
| 100 |
+
|
| 101 |
+
将数码照片转换为胶片风格可以看作是一个图像风格转换任务。所以整体的架构采用了 cycleGAN 网络。
|
| 102 |
+
[pytorch-CycleGAN-and-pix2pix](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix)
|
| 103 |
+
而且获取大规模数码照片与胶片风格照片的数据比较困难,所以采用无监督的方式,使用未配对的数据进行训练。
|
| 104 |
+
|
| 105 |
+
### 数据集
|
| 106 |
+
|
| 107 |
+
数据集由双源影像数据构成,主体部分采集自小米13 Ultra 手机拍摄的高质量数码照片,其余选自专业HDR影像数据集。
|
| 108 |
+
胶片样片搜集于网络。
|
| 109 |
+
|
| 110 |
+
### 文件目录说明
|
| 111 |
+
|
| 112 |
+
- DigitalFilm.ipynb 用来训练模型
|
| 113 |
+
- app 一个 Demo
|
| 114 |
+
- digitalFilm.py
|
| 115 |
+
- mynet.py
|
| 116 |
+
- mynet2.py
|
| 117 |
+
|
| 118 |
+
### 版本控制
|
| 119 |
+
|
| 120 |
+
该项目使用Git进行版本管理。您可以在repository参看当前可用版本。
|
| 121 |
+
|
| 122 |
+
### 作者
|
| 123 |
+
|
| 124 |
+
151122876@qq.com SongZihui-sudo
|
| 125 |
+
|
| 126 |
+
知乎:Dr.who   qq:1751122876
|
| 127 |
+
|
| 128 |
+
*您也可以在贡献者名单中参看所有参与该项目的开发者。*
|
| 129 |
+
|
| 130 |
+
### 版权说明
|
| 131 |
+
|
| 132 |
+
该项目签署了 GPLv3 授权许可,详情请参阅 [LICENSE.txt](./LICENSE.txt)
|
rollei_infrared_400.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b6186e8a0ab6ef12676b802900e7c3e8979caf03dc382f921eb4d856da800d76
|
| 3 |
+
size 257791314
|