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

Tune and fix bugs for new transformations #22

Open
MENG2010 opened this issue Aug 26, 2019 · 7 comments
Open

Tune and fix bugs for new transformations #22

MENG2010 opened this issue Aug 26, 2019 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@MENG2010
Copy link
Member

MENG2010 commented Aug 26, 2019

  1. Some causes crash while some generated black images.
    list:
    new filter transformations,
    denoising transformations,
    geo transformations,
    seg transformations.

  2. Rename some of the existing transformation types to organize all transformations better.

@MENG2010 MENG2010 added the bug Something isn't working label Aug 26, 2019
@pooyanjamshidi
Copy link
Member

some of them may only applicable to coloured images.

@MENG2010
Copy link
Member Author

MENG2010 commented Aug 27, 2019

Problems for new transformations.

  • augmentation
    zca_whitening = zca_whitening; need to tune parameters on both grayscales and color images

  • filter

filter_entropy = filter_entropy; crash on both grayscales and color images
filter_roberts = filter_roberts; crash on both grayscales and color images
filter_scharr = filter_scharr; crash on both grayscales and color images
filter_prewitt = filter_prewitt; crash on both grayscales and color images
filter_meijering = filter_meijering; crash on grayscales and tune parameters for color images.
filter_sato = filter_sato; crash on grayscales and tune parameters for color images.
filter_frangi = filter_frangi; crash on grayscales and tune parameters for color images.
filter_hessian = filter_hessian; crash on grayscales and tune parameters for color images.
filter_skeletonize = filter_skeletonize; to implement
filter_thin = filter_thin; to implement

  • denoising

denoise_tv_chambolle = denoise_tv_chambolle; crash on both grayscales and color images
denoise_tv_bregman = denoise_tv_bregman; crash on both grayscales and color images
denoise_bilateral = denoise_bilateral; crash on both grayscales and color images
denoise_wavelet = denoise_wavelet;crash on both grayscales and color images
denoise_nl_means = denoise_nl_means;crash on both grayscales and color images
denoise_nl_fast = denoise_nl_means_fast;crash on both grayscales and color images

  • geometric

geo_swirl = geo_swirl; crash on both grayscales and color images
geo_random = geo_random; crash on both grayscales and color images
geo_iradon = geo_iradon; crash on both grayscales and color images
geo_iradon_sart = geo_iradon_sart; crash on both grayscales and color images

  • segmentation

seg_gradient = seg_gradient; crash on both grayscales and color images
seg_watershed = seg_watershed; crash on both grayscales and color images

@StephenBaione
Copy link

Here are the current states of the new transformations:

  • Working

    • filter_entropy
    • filter_roberts
    • filter_scharr
    • filter_prewitt
    • denoise_tv_chambolle
    • denoise_tv_bregman
    • denoise_wavelet
    • denoise_nl_means
    • denoise_nl_fast
    • geo_swirl
    • geo_random
    • geo_iradon
    • seg_gradient
  • Questionable

    • zca_whitening: brightness_level might still need some tuning, especially for cifar
    • filter_skeletonize only works for mnist (Needs parameter tuning for cifar)
    • filter_thin only works for mnist (Needs parameter tuning for cifar)
  • Not working

    • filter_meijering crashes for mnist: "Unsupported depth of input_image" (Questionable for
      cifar) 
    • filter_sato crashes for mnist - "Unsupported depth of input image" (Black images for cifar)
    • filter_frangi crashes for mnist - "Unsupported depth of input image" (Black images for cifar)
    • filter_hessian crashes for mnist - "Unsupported depth of input image" (Black images for cifar)
    • denoise_bilateral - "ValueError: Buffer dtype mismatch, expected 'float32_t' but got 'double'"
    • geo_iradon_sart - "ValueError: Buffer dtype mismatch, expected 'double_t' but got 'float'"
    • seg_watershed - Seems to be working for most of mnist (Black images for cifar)

@MENG2010
Copy link
Member Author

MENG2010 commented Aug 28, 2019

The fix for new transformations leads to regression bugs in existed transformations. Please roll back your last commit.

@MENG2010
Copy link
Member Author

no need to roll back the commit.
By taking back
if (transformation == TRANSFORMATION.filter_sobel): for img in original_images: if (nb_channels == 3): img = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
the introduced crash can be solved.

I will suggest converting images (gray to color, and color to gray) in each transformation branch, to decouple the transformation process from the two functions:
transformation_color and transformation_gray,

@MENG2010
Copy link
Member Author

MENG2010 commented Aug 30, 2019

Fixed bugs and tuned parameters for the following transformations.

  1. We should NOT change the shape of the input dataset after applied transformations, otherwise, the transformed dataset cannot be used to train models (the input shape will be wrong).
  2. We should not distort the images too much after applied transformations. i.e., we should not change the ground truth of the image.

The following transformations are working and ready for model training.

  • filter_entropy
  • filter_roberts
  • filter_scharr
  • filter_prewitt
  • denoise_tv_chambolle
  • denoise_tv_bregman
  • denoise_wavelet
  • denoise_nl_means
  • denoise_nl_fast
  • geo_swirl
  • geo_iradon
  • geo_iradon_sart
  • seg_gradient

geo_radon will never output an image which can be identified. I'd suggest to remove it from our list.

@pooyanjamshidi
Copy link
Member

I fixed filter_meijering and added contrast, and brightness

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants