cc-ai / kdb

AI can help Visualizing the Impacts of Climate Change. This is an open forum to share our work
https://mila.quebec/en/ai-society/visualizing-climate-change/
Apache License 2.0
19 stars 3 forks source link

Bias Image Inpainting to paint water #77

Closed gcosne closed 4 years ago

gcosne commented 5 years ago

Exploring inpainting methods such as : Generative Image Inpainting to paint water.

gcosne commented 5 years ago

To do :

  1. Images must be constant size
  2. Adapt code to use custom masks

It seems that masks are randomly generated and some modifications of the data loader are required to use custom masks : 275.

Author suggests having a look at neuralgym.data_from_fnames. cf neuralgym

gcosne commented 5 years ago

Actual version of the code I'm modifying is the V2. The first version of the paper & code was designed for mask of rectangular shape while v2 works well with any mask. image

Current state: - Training with random mask and monitoring tensorboard on slurm is working.

But I have several issues while loading custom mask with the neuralgym dataloader error : _'data_fromfnames.py:153: image is None' .

Suggestion:

sashavor commented 5 years ago

Did you see this issue? https://github.com/JiahuiYu/generative_inpainting/issues/48 and #15 too

On Thu, Jun 27, 2019 at 11:29 AM Gautier Cosne notifications@github.com wrote:

Actual version of the code I'm modifying is the V2 https://github.com/Yukariin/generative_inpainting. The first version of the paper & code was designed for mask of rectangular shape while v2 works well with any mask. [image: image] https://user-images.githubusercontent.com/25148268/60278775-066cf680-98ce-11e9-9e3e-e45c65bff560.png

Current state: - Training with random mask and monitoring tensorboard on slurm is working.

But I have several issues while loading custom mask with the neuralgym dataloader error : 'data_from_fnames.py:153: image is None' .

Suggestion:

  • Building a custom dataloader for image-mask pairs.
  • The difficulty lies in not breaking the data-augmentation procedure.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cc-ai/kdb/issues/77?email_source=notifications&email_token=ADMMIIVVVCXJL4MLTQ4L3DDP4TMGJA5CNFSM4HZAH7I2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYXPSSQ#issuecomment-506394954, or mute the thread https://github.com/notifications/unsubscribe-auth/ADMMIIVIBS5DFMST2FUOU73P4TMGJANCNFSM4HZAH7IQ .

-- Sasha Luccioni Postdoctoral Researcher Climate Change AI https://mila.quebec/en/person/sasha-luccioni/

sashavor commented 5 years ago

Also this: https://github.com/JiahuiYu/generative_inpainting/issues/9

On Thu, Jun 27, 2019 at 1:01 PM Sasha Luccioni luccionis@mila.quebec wrote:

Did you see this issue? https://github.com/JiahuiYu/generative_inpainting/issues/48 and #15 too

On Thu, Jun 27, 2019 at 11:29 AM Gautier Cosne notifications@github.com wrote:

Actual version of the code I'm modifying is the V2 https://github.com/Yukariin/generative_inpainting. The first version of the paper & code was designed for mask of rectangular shape while v2 works well with any mask. [image: image] https://user-images.githubusercontent.com/25148268/60278775-066cf680-98ce-11e9-9e3e-e45c65bff560.png

Current state: - Training with random mask and monitoring tensorboard on slurm is working.

But I have several issues while loading custom mask with the neuralgym dataloader error : 'data_from_fnames.py:153: image is None' .

Suggestion:

  • Building a custom dataloader for image-mask pairs.
  • The difficulty lies in not breaking the data-augmentation procedure.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cc-ai/kdb/issues/77?email_source=notifications&email_token=ADMMIIVVVCXJL4MLTQ4L3DDP4TMGJA5CNFSM4HZAH7I2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYXPSSQ#issuecomment-506394954, or mute the thread https://github.com/notifications/unsubscribe-auth/ADMMIIVIBS5DFMST2FUOU73P4TMGJANCNFSM4HZAH7IQ .

-- Sasha Luccioni Postdoctoral Researcher Climate Change AI https://mila.quebec/en/person/sasha-luccioni/

-- Sasha Luccioni Postdoctoral Researcher Climate Change AI https://mila.quebec/en/person/sasha-luccioni/

gcosne commented 5 years ago

I shamefully had an issue with the path & number of channels, I still have some issues with data augmentation here but it works if I disable it.

First epochs.. image

image

sashavor commented 5 years ago

It's not shameful! It's part of research!

On Thu, Jun 27, 2019, 16:10 Gautier Cosne notifications@github.com wrote:

I shamefully had an issue with the path & number of channels, I still have some issues with data augmentation here but it works if I disable it.

First epochs.. [image: image] https://user-images.githubusercontent.com/25148268/60297284-d76a7b00-98f5-11e9-8ef3-0cb7209d7425.png

[image: image] https://user-images.githubusercontent.com/25148268/60297339-f49f4980-98f5-11e9-92b1-4e3b7f01d762.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cc-ai/kdb/issues/77?email_source=notifications&email_token=ADMMIIQPF2KZC467MF7OXP3P4UNCDA5CNFSM4HZAH7I2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYYHLJI#issuecomment-506492325, or mute the thread https://github.com/notifications/unsubscribe-auth/ADMMIIUCMG4HY2II7KVFKATP4UNCDANCNFSM4HZAH7IQ .

gcosne commented 5 years ago

Link to the code: https://github.com/cc-ai/generative_inpainting

GitHub
cc-ai/generative_inpainting
Generative Image Inpainting with Contextual Attention https://arxiv.org/abs/1801.07892, demo http://jiahuiyu.com/deepfill - cc-ai/generative_inpainting