Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A question about training with RGB images #3

Closed
Vandermode opened this issue Mar 21, 2019 · 2 comments
Closed

A question about training with RGB images #3

Vandermode opened this issue Mar 21, 2019 · 2 comments

Comments

@Vandermode
Copy link

Hi, nice work. I look at the example 2D and find you augment data with shape N x H x W x 1 by a mask such that the final input size would be N x H x W x 2. When it applies to RGB image, is that mean we should augment the input image size to N x H x W x 6? Thank you in advance.

@fjug
Copy link
Member

fjug commented Mar 24, 2019

@alex-krull @tibuch ?

@tibuch
Copy link
Collaborator

tibuch commented Apr 1, 2019

Hi @Vandermode
Apologies for the delayed answer.

The input (X) should just be the normal image i.e. N x H x W x 1 for grayscale and N x H x W x 3 for RGB images. We decided attach the mask to the target (Y), since the mask is only used during training. In the case of a RGB image 3 additional masks are needed, because every channel gets its own mask

self.Y_Batches[(j, *coords[k], self.n_chan+c)] = 1
. This is possible because the noise is independent across channels.

It just occurred to me that our current implementation is not optimal. We mask the same pixel in all channels

for k in range(len(coords)):
for c in range(self.n_chan):
self.Y_Batches[(j, *coords[k], c)] = y_val[k][c]
self.Y_Batches[(j, *coords[k], self.n_chan+c)] = 1
self.X_Batches[(j, *coords[k], c)] = x_val[k][c]
, which is not required. I will investigate and fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants