cc-ai / MaskGenerator

End-to-end trainable mask generation
GNU General Public License v3.0
2 stars 2 forks source link

Mask Depth Generator image logging #22

Closed melisandeteng closed 4 years ago

melisandeteng commented 4 years ago

Pull request to add depth map input

Currently the images of depth maps are not logged in comet. Here is how depth maps are set as input:

vict0rsch commented 4 years ago

I'm not sure I understand the problem here. Is it a display issue? if so, I'm not sure it matters, plot whatever's best?

like

T = (T + 1) / 2 # [-1; 1] => [0, 1]
T = log(1/(T + eps)) # => inv log depth
T -= T.min() 
T /= T.max() # => normalize
melisandeteng commented 4 years ago

Yes, indeed if it's just for visualization, I don't really need to bother keeping the exact values...

melisandeteng commented 4 years ago

@vict0rsch I'll do a pull request once I've added the depth map logging. Also, when logging the images, the same generated mask is repeated for all the images from simulated data. (and the same for images from the real dataset) in one figure.

melisandeteng commented 4 years ago

Also other bug that needs to be fixed: depth map conversion does not seem to be properly working

vict0rsch commented 4 years ago

new issue for that with more details?

melisandeteng commented 4 years ago

Depth map conversion has been fixed in this commit item from the loader needed to be multiplied by 255.

vict0rsch commented 4 years ago

any idea why git thinks you changed EVERYTHING in the files? It makes it really hard to review code if we don't know what changed... :(

melisandeteng commented 4 years ago

That seems to happen every time I push from a session on the cluster, it doesn’t merge conflicts well and just puts the whole content of the file I try to put as the head.

melisandeteng commented 4 years ago

Also I am reposting the issue I have with image logs from the pull request #23 : @vict0rsch @51N84D

sashavor commented 4 years ago

is that happening when you run other people's code or only the one you wrote?

On Sat, May 9, 2020 at 4:01 PM melisandeteng notifications@github.com wrote:

Also I am reposting the issue I have with image logs from the pull request

23 https://github.com/cc-ai/MaskGenerator/pull/23 : @vict0rsch

https://github.com/vict0rsch @51N84D https://github.com/51N84D

— 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/MaskGenerator/issues/22#issuecomment-626228167, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMMIIUGU2OBLHJ7NMKU3KLRQWZB3ANCNFSM4M3Q7AHA .

-- Sasha Luccioni, PhD Director of Scientific Projects (AI for Humanity, Mila), Postdoctoral Researcher (UdeM) Directrice des projets scientifiques (IA pour l'humanité, Mila), Chercheure postdoctorale (UdeM) [image: Image result for universite de montreal logo]

vict0rsch commented 4 years ago

@melisandeteng I'll have a look tomorrow!

melisandeteng commented 4 years ago

@sashavor This doesn't happen for the non depth version - although I based the image log for the depth version on the non depth one, ...

vict0rsch commented 4 years ago

@melisandeteng can you put the file lists .json in tmp1/ccai?

I can't see them in /network/tmp1/ccai/data/mask_generation/WD

vict0rsch commented 4 years ago

Also I don't understand something:

save_test_images gets test_display_data, a list of outputs from the Dataset. For each element in the list, it passes it to set_input_display whose sole goal is to set data as attributes to the model. And then you compute save_mask based on self.image and self.mask, and save_fake_mask based on self.image and self.fake_mask but you never call forward() so you never re-set the fake_mask. I think that may be the mistake

51N84D commented 4 years ago

Also I don't understand something:

save_test_images gets test_display_data, a list of outputs from the Dataset. For each element in the list, it passes it to set_input_display whose sole goal is to set data as attributes to the model. And then you compute save_mask based on self.image and self.mask, and save_fake_mask based on self.image and self.fake_mask but you never call forward() so you never re-set the fake_mask. I think that may be the mistake

the call "test()" is just a wrapper for calling "forward()" but without gradients

51N84D commented 4 years ago

Also I am reposting the issue I have with image logs from the pull request #23 : @vict0rsch @51N84D

  • Need help to find out why the same generated mask is displayed from all images of the same domain (real / sim) in an image log in comet. You can see an example for that problem in this comet experiment

Just made a pull request to fix this. The issue was that the function "set_input_display" wasn't complete. It needed to set the variables "self.input" and "self.r_input" which are used in "forward()"

vict0rsch commented 4 years ago

ok cool, I discarded it as being analogous to .val()

melisandeteng commented 4 years ago

@melisandeteng can you put the file lists .json in tmp1/ccai?

I can't see them in /network/tmp1/ccai/data/mask_generation/WD

That's normal, we don't have depth dataset for WD fro the moment. I can generate the depth maps with Megadepth for WD dataset, but can't guarantee the quality. train_depth.json and test_depth for Unity dataset are in there /network/tmp1/ccai/data/mask_generation/Unity1000R_fL_lowRes and those for real images are here /network/tmp1/ccai/data/mask_generation/streetview_mvp (does not contain all our real images just because megadepth only works on certain image sizes and I did not want to compute it on squished images) .

melisandeteng commented 4 years ago

@vict0rsch I will document where the .json files for each dataset are in the README.md.