Comments (4)
不知道我又没有理解对,你是想把CycleGAN的循环一致性约束加进去。在我做StarEnhancer的时候是不起作用的,但是后来我的一个未发表新工作(结构上有差别)又显示它可以提点。所以我也尚不清楚循环一致性约束的起效条件,但是我觉得你可以自行尝试一下,还是有希望提点的。
至于Triplet loss这种正负样本损失,在我的实验中是没有明显效果的。
from starenhancer.
是的,因为没有配对图,所以想尝试CycleGAN的思路,但是经过几次enhancer后,recover和source在rgb2lab后计算L1loss时会出问题。
/opt/conda/conda-bld/pytorch_1603728993639/work/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:115: operator(): block: [374,0,0], thread: [10,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/opt/conda/conda-bld/pytorch_1603728993639/work/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:115: operator(): block: [374,0,0], thread: [14,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
Traceback (most recent call last):
File "train_enhancer_triplet.py", line 139, in <module>
loss = train(train_loader, mapping, enhancer, criterion, optimizer)
File "train_enhancer_triplet.py", line 64, in train
loss_l1 = criterion(recoverA, source_img) + criterion(recoverB, target_img)
File "/simple/zlp1/miniconda3/envs/py365/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/simple/zlp1/masters/StarEnhancer/model/loss.py", line 56, in forward
out_lab = self.rgb2lab(out_image)
File "/simple/zlp1/masters/StarEnhancer/model/loss.py", line 48, in rgb2lab
img[(img != img).detach()] = 0
RuntimeError: CUDA error: device-side assert triggered
from starenhancer.
这好像是内存索引超边界了,远程排查比较困难,你尝试一下:
- lab上的L1 loss换成rgb上的L1 loss,也就是不经过rgb2lab这一步
- 预测曲线参数的网络最后添加tanh,确保output的值域在[-1, 1],否则recover的时候输入超出了曲线的输入值域
- FEModel看上去是一个类似perceptual loss那样的预训练模型,尝试去掉相关的内容
from starenhancer.
好的,1、3方法实验过是ok的,2中方法我去试试。谢谢您的解答!
from starenhancer.
Related Issues (11)
- Have you tried image retouching with StarEnhancer? HOT 6
- The results are not the same as the paper
- About pretrain model HOT 1
- One question about the code under the setting of sigle-style enhancement HOT 1
- How can I use style encoder to train classification on my dataset?
- Questions about dataset preparation HOT 4
- Is it possible to use a network such as VGG19 for the style encoder? HOT 4
- Is it feasible to use GAN for unpaired training? HOT 4
- Dataset processing HOT 2
- How to test with my own style HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starenhancer.