Comments (14)
I think the problem is the --lambda_identity should not be 0. It is a very important parameter, please refer to the paper of CycleGAN
from bdl.
Thanks for the help, i will try it.
i am very fimiliar with CycleGAN, but i think you didn't mention it in the paper, so i assumed lambda_identity=0.
from bdl.
i added the identity loss and reduced the patch size to 368 to fit the gpu. i got even lower result - 40.26. Could you please release the full CycleGan code you used?
from bdl.
I don't have time to clear all the codes for CycleGAN right now. Furthermore, I think it is not very necessary because I just use the official code of CycleGAN and make some changes by adding the perceptual loss. I think the problem you might have is the parameters you use to train CycleGAN are not the same as what I use. Could you post all the training parameters you use?
from bdl.
Attach below the train.txt created by CycleGan code.
Do you see here any difference compare to yours (except Crop Size)?
----------------- Options ---------------
batch_size: 1
beta1: 0.5
checkpoints_dir: ./checkpoints
continue_train: False
crop_size: 368 [default: 256]
dataroot: datasets/gta/ [default: None]
dataset_mode: unaligned
direction: AtoB
display_env: main
display_freq: 400
display_id: -1 [default: 1]
display_ncols: 4
display_port: 8097
display_server: http://localhost
display_winsize: 256
epoch: latest
epoch_count: 1
gan_mode: lsgan
gpu_ids: 4,5 [default: 0]
init_gain: 0.02
init_type: normal
init_weights: deep_lab_checkpoint/cyclegan_sem_model.pth [default: semantic model initialization ]
input_nc: 3
isTrain: True [default: None]
lambda_A: 10.0
lambda_B: 10.0
lambda_identity: 0.5
lambda_semantic: 1
load_iter: 0 [default: 0]
load_size: 1024 [default: 286]
lr: 0.0002
lr_decay_iters: 50
lr_policy: linear
max_dataset_size: inf
model: cycle_gan
n_layers_D: 3
name: original_with_identity [default: experiment_name]
ndf: 64
netD: basic
netG: resnet_9blocks
ngf: 64
niter: 10 [default: 100]
niter_decay: 10 [default: 100]
no_dropout: True
no_flip: False
no_html: False
norm: instance
num_threads: 4
output_nc: 3
phase: train
pool_size: 50
preprocess: resize_and_crop
print_freq: 100
save_by_iter: False
save_epoch_freq: 5
save_latest_freq: 5000
serial_batches: False
suffix:
update_html_freq: 1000
verbose: False
----------------- End -------------------
from bdl.
I don't find any obvious problem. Maybe I use 4 or 8GPUs. The number of GPU can also influence the results. You can also first remove the percepture loss and improve the crop size of the images to 400 and see what performance you can get. Could you also share the logs to me? I want to know whether the loss changes correctly. Have you ever observed the transferred images?
from bdl.
hi,
- attach link to the log:
https://drive.google.com/file/d/1Q6voRvbIRelo3UtvR-55YaOEiNX2HFx5/view?usp=sharing
but unlike the original repository, i print the average loss in the epoch instead of per batch. - i did observed the images, in general it looks "good", it make them look green like the real images.
from bdl.
After check your log, I find the magnitude of the loss is not correct. All the losses are too small. I don't know the exact reason. I think the rec_sem_loss should be more than 10 in the beginning and decreases to around 1 after the training is complete. You can also find the D_A is also very small, actually I don't think the discriminator is well learned based on the loss you print.
from bdl.
i was able to run on a machine with 4 gpu and 16GB (so i used batch size 4, and the same crop size that you used), i was able to reproduce your result, i got 42.55 while you reported 42.7.
i am closing the thread. i guess you should write that you used 4 gpus for the training in the and using identity loss.
Thanks for the help!
from bdl.
Thanks for your suggesting. I will add the configuration to my new Arxiv version.
from bdl.
@liyunsheng13 could you please confirm what batch size you used to get the final results? It is a very import hyperparameter for semantic segmentation (especially in the deeplab architecture).
I think it is hard to get the reported results if the whole pipeline is trained with bsize=1 (which is the default option). I've always read that the stats computed by batchnorm with small bsize are inaccurate.
from bdl.
The batch size is 1 for all segmentation models.
from bdl.
Thank you for your answer, but what did you mean here then?
I don't find any obvious problem. Maybe I use 4 or 8GPUs. The number of GPU can also influence the results.
If you use batch size 1, then I think you only need 1 GPU. Or do you mean that 1 is the batch size per GPU?
from bdl.
We were talking about CycleGAN model not the segmentation model
from bdl.
Related Issues (20)
- Complete training procedure HOT 1
- Train CycleGAN HOT 2
- First Image Transltation HOT 6
- About the implementation HOT 1
- Number of common classes in Synthia dataset HOT 2
- About SYNTHIA to Cityscapes HOT 1
- Bug in the DeepLab ResNet101 atrous convolution forward function HOT 3
- does BDL support for pytorch 1.7 and cuda 10.2? HOT 1
- how to train own custom dataset? HOT 3
- error at running train.py for cyclegan HOT 2
- Inconsistency fix from CycleGan repository HOT 1
- problem about loss become nan HOT 1
- fineSize (cropSize) for Cycle-Gan HOT 5
- quick question HOT 5
- Issues with reproducing results using pre-trained weights on PyTorch 1.7 and CUDA 11 HOT 4
- About confidence threshold in SSL HOT 2
- Color of pseudolabels HOT 1
- Question about train,thanks
- Initialization of Deeplabv2 HOT 1
- Question about translation model (F)
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 bdl.