cameronfabbri / Underwater-Color-Correction

Using GANs to correct color distortion in underwater images.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Artifacts in reconstructed images

hashJoe opened this issue · 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

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

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

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.

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 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.

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

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

@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.

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

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

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

@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?

@

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