ELEKTRONN / elektronn3

A PyTorch-based library for working with 3D and 2D convolutional neural networks, with focus on semantic segmentation of volumetric biomedical image data
MIT License
161 stars 27 forks source link

introduced handling for target = None in RandomRotate2d #42

Closed riegerfr closed 4 years ago

riegerfr commented 4 years ago

For training the SECGAN, I tried using the RandomRotate-transformation. Since in this scenario, there are no targets given in the KnossosRawData, it fails in the following line: https://github.com/ELEKTRONN/elektronn3/blob/d599a6ab805e1f724d38037d3fad73e3aff04f12/elektronn3/data/transforms/transforms.py#L1005

Called in: https://github.com/ELEKTRONN/elektronn3/blob/d599a6ab805e1f724d38037d3fad73e3aff04f12/elektronn3/data/knossos.py#L101

Suggestion: check whether 'target is not None' in the RandomRotate-class like in the RandomFlip-class

mdraw commented 4 years ago

Looks good, thanks!