Underwater-Color-Correction icon indicating copy to clipboard operation
Underwater-Color-Correction copied to clipboard

Artifacts in reconstructed images

Open hashJoe opened this issue 6 years ago • 13 comments

After downloading your checkpoints (pretrained network) and generating images on different test images, the generated images include artifacts. Please check the attached images for more details. Could you please check your code or your checkpoints again? Thanks :) 00196_gen 00118_gen 00023_gen

hashJoe avatar Dec 11 '18 21:12 hashJoe

I encountered the same problem when using the pretrained checkpoint. paper2_gen I have no problem with my own retraining.

falrom avatar Dec 20 '18 12:12 falrom

How long did it take you to train the network? If you trained it on their same dataset, could you please share your checkpoints? Thanks

hashJoe avatar Dec 20 '18 13:12 hashJoe

I haven't finished the training yet (about two days). If the test works, I will give you the ckpt. But I have some problems with the BN layers. So, emmm....I am not sure that I will complete the final training.

falrom avatar Dec 20 '18 13:12 falrom

These are interesting, thank you for pointing out some issues. I've only seem similar artifacts when evaluating on images that were far different than the training set, but the shark @falrom posted I've tested on and haven't seen artifacts. How long did you train for? My results are after 100 epochs of training.

cameronfabbri avatar Dec 20 '18 20:12 cameronfabbri

@cameronfabbri The fish picture above was processed by the pretrained checkpoint downloaded from the project page. I retrained the network and got good results like this: 89500_paper2_gen I don't know why... (Mine: python2.7 + TF1.10.0)

@hashishoya I have finished the training and this is the checkpoint. You may try it. It took about 3 days. (step 89500/epoch 468) cut It seems that 100 epochs are enough.

falrom avatar Dec 21 '18 10:12 falrom

Can you please tell what GPU device model you used? Thanks for sharing your checkpoints :)

hashJoe avatar Dec 21 '18 11:12 hashJoe

CPU : intel i7 7800X RAM : 32GB DDR4 GPU : GeForce GTX 1080Ti OS : Ubuntu 16.04 LTS

falrom avatar Dec 21 '18 11:12 falrom

@falrom Nice! I'll have to take a look at the checkpoints I have, it's possible I put up the wrong one. Your trained model looks to be what is expected.

cameronfabbri avatar Dec 21 '18 14:12 cameronfabbri

I can't seem to get tensorflow to load the checkpoint provided from @falrom - it does not contain the file called 'checkpoint' in the directory, do you know what the story is there? 'tf.train.get_checkpoint_state(EXPERIMENT_DIR)' returns None

python2.7 tensorflow 1.12 from conda (tensorflow-gpu)

Ubuntu 16.04 also

The checkpoint provided by the author @cameronfabbri loads correctly but I see the same artifacts.

l00007680_gen

l00006130_gen

oliver-batchelor avatar Jan 01 '19 05:01 oliver-batchelor

You can just assign the value to EXPERIMENT_DIR directly in the python code.

    # EXPERIMENT_DIR  = 'checkpoints/LOSS_METHOD_'+LOSS_METHOD\
    #                   +'/NETWORK_'+NETWORK\
    #                   +'/L1_WEIGHT_'+str(L1_WEIGHT)\
    #                   +'/IG_WEIGHT_'+str(IG_WEIGHT)\
    #                   +'/AUGMENT_'+str(AUGMENT)\
    #                   +'/DATA_'+DATA+'/'\

    EXPERIMENT_DIR = 'checkpoints/LOSS_METHOD_wgan/NETWORK_pix2pix/L1_WEIGHT_100.0/IG_WEIGHT_0.0/AUGMENT_0/DATA_underwater_imagenet/'

The EXPERIMENT_DIR must contain these 3 files: image

falrom avatar Jan 02 '19 03:01 falrom

I solved it by adding a file called 'checkpoint' which cointains this:

model_checkpoint_path: "checkpoint-89500" all_model_checkpoint_paths: "checkpoint-89000" all_model_checkpoint_paths: "checkpoint-89500"

After that it works - I had a play around trying it on some real underwater images, unfortunately it doesn't seem to produce nice results with significant turbidity, with a lot of 'gridding' going on. I guess removing turbidity is a whole different problem!

r00010550_real

r00010550_gen

l00011810_real

l00011810_gen

oliver-batchelor avatar Jan 02 '19 11:01 oliver-batchelor

@cameronfabbri The fish picture above was processed by the pretrained checkpoint downloaded from the project page. I retrained the network and got good results like this: 89500_paper2_gen I don't know why... (Mine: python2.7 + TF1.10.0)

@hashishoya I have finished the training and this is the checkpoint. You may try it. It took about 3 days. (step 89500/epoch 468) cut It seems that 100 epochs are enough.

@cameronfabbri - Can you please confirm if the uploaded checkpoint performs as per the model's expectations?

RaghuRajRai avatar Nov 25 '19 14:11 RaghuRajRai

@

You can just assign the value to EXPERIMENT_DIR directly in the python code.

    # EXPERIMENT_DIR  = 'checkpoints/LOSS_METHOD_'+LOSS_METHOD\
    #                   +'/NETWORK_'+NETWORK\
    #                   +'/L1_WEIGHT_'+str(L1_WEIGHT)\
    #                   +'/IG_WEIGHT_'+str(IG_WEIGHT)\
    #                   +'/AUGMENT_'+str(AUGMENT)\
    #                   +'/DATA_'+DATA+'/'\

    EXPERIMENT_DIR = 'checkpoints/LOSS_METHOD_wgan/NETWORK_pix2pix/L1_WEIGHT_100.0/IG_WEIGHT_0.0/AUGMENT_0/DATA_underwater_imagenet/'

The EXPERIMENT_DIR must contain these 3 files: image

@falrom 您好,不知道您方不方便告诉我怎样测试UGAN呢?我一直出现下面的错误,但是不知道该怎样改正? image

dingyan1478 avatar Oct 12 '21 13:10 dingyan1478