Comments (12)
@Lvhhhh
mode=4
is what we initially did and our paper and initial results are based on the joint optimization of G1 and G2. However, in our later experiments, we really didn't find a significant improvement over fixing G1 parameters (mode=3
) and that's why when we released the code, we mode=3
the final stage. The other reason is that mode=4 slows down training drastically compared to mode=3.
If you don't want to train the edge model, then you can directly jump to stage 3, that is mode=3
.
from edge-connect.
@Lvhhhh The problem is your mask dataset. Almost entire input space is masked in your mask dataset. Honestly, I'm surprised that the network can create even the blurry result!
Please use this Irregular Mask Dataset for training. Also make sure you change the loss values to match the values we defined in our paper:
STYLE_LOSS_WEIGHT: 250
CONTENT_LOSS_WEIGHT: 0.1
INPAINT_ADV_LOSS_WEIGHT: 0.1
from edge-connect.
thank you for your answer! i train this mode=3 but i found the color of result may be wrong. here is the result .
from edge-connect.
the training picture is here. why the picture is so blur?
from edge-connect.
here is the config.yml
MODE: 1 # 1: train, 2: test, 3: eval
MODEL: 3 # 1: edge model, 2: inpaint model, 3: edge-inpaint model, 4: joint model
MASK: 3 # 1: random block, 2: half, 3: external, 4: (external, random block), 5: (external, random block, half)
EDGE: 1 # 1: canny, 2: external
NMS: 1 # 0: no non-max-suppression, 1: applies non-max-suppression on the external edges by multiplying by Canny
SEED: 10 # random seed
GPU: [0] # list of gpu ids
DEBUG: 0 # turns on debugging mode
VERBOSE: 0 # turns on verbose mode in the output console
TRAIN_FLIST: ./place_train.list
VAL_FLIST: ./place_val.list
TEST_FLIST: ./place_val.list
TRAIN_EDGE_FLIST: ./datasets/places2_edges_train.flist
VAL_EDGE_FLIST: ./datasets/places2_edges_val.flist
TEST_EDGE_FLIST: ./datasets/places2_edges_test.flist
TRAIN_MASK_FLIST: ./qd_train.list
VAL_MASK_FLIST: ./qd_test.list
TEST_MASK_FLIST: ./qd_test.list
LR: 0.0001 # learning rate
D2G_LR: 0.1 # discriminator/generator learning rate ratio
BETA1: 0.0 # adam optimizer beta1
BETA2: 0.9 # adam optimizer beta2
BATCH_SIZE: 1 # input batch size for training
INPUT_SIZE: 256 # input image size for training 0 for original size
SIGMA: 2 # standard deviation of the Gaussian filter used in Canny edge detector (0: random, -1: no edge)
MAX_ITERS: 2e6 # maximum number of iterations to train the model
EDGE_THRESHOLD: 0.5 # edge detection threshold
L1_LOSS_WEIGHT: 1 # l1 loss weight
FM_LOSS_WEIGHT: 10 # feature-matching loss weight
STYLE_LOSS_WEIGHT: 1 # style loss weight
CONTENT_LOSS_WEIGHT: 1 # perceptual loss weight
INPAINT_ADV_LOSS_WEIGHT: 0.01 # adversarial loss weight
GAN_LOSS: nsgan # nsgan | lsgan | hinge
GAN_POOL_SIZE: 0 # fake images pool size
SAVE_INTERVAL: 1000 # how many iterations to wait before saving model (0: never)
SAMPLE_INTERVAL: 1000 # how many iterations to wait before sampling (0: never)
SAMPLE_SIZE: 12 # number of images to sample
EVAL_INTERVAL: 0 # how many iterations to wait before model evaluation (0: never)
LOG_INTERVAL: 10 # how many iterations to wait before logging training status (0: never)
from edge-connect.
the reason is no sufficient training or some other problem? thank you for your time
from edge-connect.
@Lvhhhh
Your training sample is not loading completely! However, judging by the partial image, it looks like you are using a very sparse training mask dataset! We used this Testing Irregular Mask Dataset for our training which contains 12,000 irregular masks. Make sure you have the right mask dataset.
Also, in your configuration file, make sure to change the value of STYLE_LOSS_WEIGHT
from 1 to 250. That's the value we used and mentioned in our paper.
Let us know the results after these changes.
from edge-connect.
@knazeri ,the value of CONTENT_LOSS_WEIGHT and INPAINT_ADV_LOSS_WEIGHT also need to change to 0.1,right?
from edge-connect.
@knazeri here is the training sample . the picture is blurred .what is the problem?
from edge-connect.
Thanks @cmyyy just fixed it 826f2b8
from edge-connect.
hello,I have a problem to ask to you .What is " random block, 2: half, 3: external, 4: (external, random block), 5: (external, random block, half) " meaning?
from edge-connect.
@knazeri I have a question about mask (1:random block, 2: half, 3: external, 4: (external, random Block), 5: (External, random block, half)), why there are so many options, but I don't understand each meaning.
from edge-connect.
Related Issues (20)
- About supplementary material of your paper
- Results of first stage: edge model HOT 6
- Test image is being filled in a lighter shade HOT 1
- Who can help me slove this error? (when I try to train ) HOT 5
- Run the program on CoLab
- Convergency of edge model HOT 7
- Hello, After reading your paper, may I have a question that why you choice 178 for the celebA dataset drop size.
- 如果对图像修复,edge-connect感兴趣,或者需要帮助,可以联系我
- Training on Google Colab immediately stops HOT 1
- Selection of dataset
- Canny sigma
- how to implement the visualization for the learned edges? HOT 2
- Sizes of tensors must match except in dimension 1
- New easy to use inpanting method with transformers
- When using edge=2, training has ValueError: operands could not be broadcast together with shapes (256,256,3) (256,256)
- Why is there an error when I train MODEL4: joint model/为什么我训练MODEL4 :joint model会报错
- When I tried to start training, I got an error:RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [1, 512, 4, 4]] is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True). HOT 15
- About precision and recall during training HOT 1
- The loss function is abnormal when the edge network is trained
- RuntimeError: CUDA error: device-side assert triggered CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=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 edge-connect.