blue-oil / blueoil

Bring Deep Learning to small devices
https://blueoil.org
Apache License 2.0
249 stars 86 forks source link

Class Resize and ResizeWithMask does exactly the same #462

Open Joeper214 opened 5 years ago

Joeper214 commented 5 years ago

Resize https://github.com/blue-oil/blueoil/blob/master/lmnet/lmnet/pre_processor.py#L278-L294

ResizeWithMask https://github.com/blue-oil/blueoil/blob/master/lmnet/lmnet/pre_processor.py#L242-L258

Maybe it's better to use a flag in __init__ to include mask during initialization in Resize class to remove redundant code? then remove the other one?

ytfksw commented 4 years ago

@iizukak ResizeWithMask seems to be a pre-process used in Segmentation.

I searched for ResizeWithMask, but it doesn't seem to be in use. https://github.com/blue-oil/blueoil/search?q=ResizeWithMask&unscoped_q=ResizeWithMask There is no config file used. In addition, ResizeWithMask is not tested.

Segmentation's config file uses Resize. https://github.com/blue-oil/blueoil/blob/a0078e1e0225dc627c5010429ea5f55d86af39d3/blueoil/configs/core/segmentation/lm_bisenet_quantize_camvid.py#L24 People may think that this is an unnecessary function

Deleting ResizeWithMask merit

de-merit

use a flag merit

de-merit

Which is preferable?