juglab / n2v

This is the implementation of Noise2Void training.
Other
385 stars 107 forks source link

Wrong shape in training data generation #145

Closed tibuch closed 8 months ago

tibuch commented 8 months ago

Hi everyone,

Just found a bug in the training data generation if only one patch per image is extracted. These two lines

For 2 patches per image we would get (2, 256, 256, 1), but for 1 patch per image we get (1, 1, 256, 256, 1). Adding the extra [np.newaxis] is the issue.