Synthesizing Hard Training Data from Latent Hierarchical Representations

  • Conference paper
  • First Online:
Image Analysis (SCIA 2023)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13886))

Included in the following conference series:

  • 626 Accesses

Abstract

This paper introduces a framework for creating augmented hard samples, which are new images created to resemble those that a classifier will struggle to classify. This is used for data from an automatic visual defect inspection system, specifically images of vials with and without chipped glass. The hard samples were found by training ConvNeXt classifiers and using the confidences of the classifiers on the training dataset. VQ-VAE2 was used to obtain the latent representations of the hard samples, and a PixelSnail model was used to create new high-frequency details while retaining low-frequency details. The PixelSnail model was pre-trained on a large amount of non-defect images. The augmentation method was applied to a dataset of 200 images and was evaluated by training classifiers to test the effect of using the augmented hard samples. Introducing the augmented hard samples into the dataset was found to improve classifier performance, measured in Area Under Curve (AUC) of the Receiver Operator Characteristic (ROC) curve, from 0.953 to 0.973. The method was tested with augmenting both defect and non-defect images, and the somewhat surprising conclusion is that while using augmented defect images didn’t yield improvements, augmenting non-defect images did.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now
Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    The code for this project is available at https://github.com/xxxxxx.

  2. 2.

    Code at https://github.com/rosinality/vq-vae-2-pytorch.

References

  1. Antoniou, A., Storkey, A.J., Edwards, H.: Data augmentation generative adversarial networks. Ar**v:1711.04340 (2017)

  2. Cubuk, E.D., Zoph, B., Mané, D., Vasudevan, V., Le, Q.V.: Autoaugment: learning augmentation policies from data. Ar**v: 1805.09501 (2018)

  3. Gong, C., Wang, D., Li, M., Chandra, V., Liu, Q.: Keepaugment: a simple information-preserving data augmentation approach. In: 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1055–1064 (2021)

    Google Scholar 

  4. Hu, T.Y.: Sapaugment: learning a sample adaptive policy for data augmentation. In: ICASSP 2021–2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 4040–4044 (2021)

    Google Scholar 

  5. Lemley, J., Bazrafkan, S., Corcoran, P.M.: Smart augmentation learning an optimal data augmentation strategy. IEEE Access 5, 5858–5869 (2017)

    Article  Google Scholar 

  6. Liu, H., Zhao, Z., Chen, X., Yu, R., She, Q.: Using the vq-vae to improve the recognition of abnormalities in short-duration 12-lead electrocardiogram records. Comput. Methods Prog. Biomed. 196, 105639 (2020). https://doi.org/10.1016/j.cmpb.2020.105639, https://www.sciencedirect.com/science/article/pii/S0169260720314723

  7. Liu, Z., Mao, H., Wu, C., Feichtenhofer, C., Darrell, T., **e, S.: A convnet for the 2020s (2022)

    Google Scholar 

  8. Perarnau, G., van de Weijer, J., Raducanu, B., Álvarez, J.M.: Invertible conditional gans for image editing. Ar**v: 1611.06355 (2016)

  9. Razavi, A., van den Oord, A., Vinyals, O.: Generating diverse high-fidelity images with vq-vae-2. Ar**v: 1906.00446 (2019)

  10. Vandenhende, S., Brabandere, B.D., Neven, D., Gool, L.V.: A three-player gan: generating hard samples to improve classification networks. In: 2019 16th International Conference on Machine Vision Applications (MVA), pp. 1–6 (2019)

    Google Scholar 

  11. Zhu, J.Y., Park, T., Isola, P., Efros, A.A.: Unpaired image-to-image translation using cycle-consistent adversarial networks. In: 2017 IEEE International Conference on Computer Vision (ICCV), pp. 2242–2251 (2017)

    Google Scholar 

  12. Zhu, Y., Aoun, M., Krijn, M., Vanschoren, J.: Data augmentation using conditional generative adversarial networks for leaf counting in arabidopsis plants. In: BMVC (2018)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Andreas Møgelmose .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Høj, B.J., Møgelmose, A. (2023). Synthesizing Hard Training Data from Latent Hierarchical Representations. In: Gade, R., Felsberg, M., Kämäräinen, JK. (eds) Image Analysis. SCIA 2023. Lecture Notes in Computer Science, vol 13886. Springer, Cham. https://doi.org/10.1007/978-3-031-31438-4_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-31438-4_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-31437-7

  • Online ISBN: 978-3-031-31438-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics

Navigation