Skip to main content

ImageNet Challenging Classification with the Raspberry Pis: A Federated Learning Algorithm of Local Stochastic Gradient Descent Models

  • Conference paper
  • First Online:
Future Data and Security Engineering. Big Data, Security and Privacy, Smart City and Industry 4.0 Applications (FDSE 2022)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1688))

Included in the following conference series:

  • 2302 Accesses

  • 4 Citations

Abstract

In this paper, we propose the federated learning algorithm of local stochastic gradient descent (SGD) models at edge devices (i.e. Raspberry Pis) to classify large ImageNet dataset having 1,281,167 images with 1,000 classes. The full very large training dataset is divided into subsets which are stored in local Raspberry Pis. And then, the federated learning algorithm uses Raspberry Pis to train in the incremental and parallel way local SGD models from their own subset without exchanging data. The incremental local SGD tailored on Raspberry Pi sequentially loads small data blocks of its own local training subset to learn local SGD models. In which, the local SGD algorithm uses kmeans to split the data block into k partitions and then it learns in the parallel way SGD models in each data partition to classify the data locally. The numerical test results on Imagenet dataset show that our federated learning algorithm of local SGD models with 4 Raspberry Pis (Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5 GHz, 4 GB RAM) is faster than the state-of-the-art linear SVM run on a PC (Intel(R) Core i7–4790 CPU, 3.6 GHz, 4 cores, 32 GB RAM) with the competitive classification accuracy.

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

Access this chapter

Subscribe and save

Springer+
from $39.99 /Month
  • Starting from 10 chapters or articles per month
  • Access and download chapters and articles from more than 300k books and 2,500 journals
  • Cancel anytime
View plans

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
eBook
USD 44.99
Price excludes VAT (USA)
Softcover Book
USD 59.99
Price excludes VAT (USA)

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    XML-RPC created in 1998 by Dave Winer of UserLand Software and Microsoft, is a remote procedure call (RPC) protocol which uses XML to encode its calls and HTTP protocol to exchange information between computers.

  2. 2.

    It must be noted that the complexity does not include the minibatch k-means [34] used to partition the full dataset.

References

  1. Bosch, A., Zisserman, A., Munoz, X.: Scene classification via pLSA. In: Proceedings of the European Conference on Computer Vision, pp. 517–530 (2006)

    Google Scholar 

  2. Bottou, L., Bousquet, O.: The tradeoffs of large scale learning. In: Platt, J., Koller, D., Singer, Y., Roweis, S. (eds.) Advances in Neural Information Processing Systems, vol. 20, pp. 161–168. NIPS Foundation. www.books.nips.cc (2008)

  3. Bottou, L., Vapnik, V.: Local learning algorithms. Neural Comput. 4(6), 888–900 (1992)

    Article  Google Scholar 

  4. Chollet, F.: Xception: deep learning with depthwise separable convolutions. arXiv:1610.02357 (2016)

  5. Deng, J., Berg, A.C., Li, K., Fei-Fei, L.: What does classifying more than 10,000 image categories tell us? In: Daniilidis, K., Maragos, P., Paragios, N. (eds.) ECCV 2010. LNCS, vol. 6315, pp. 71–84. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-15555-0_6

    Chapter  Google Scholar 

  6. Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., Li, F.F.: Imagenet: a large-scale hierarchical image database. In: IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pp. 248–255 (2009)

    Google Scholar 

  7. Do, T.-N.: Parallel multiclass stochastic gradient descent algorithms for classifying million images with very-high-dimensional signatures into thousands classes. Vietnam J. Comput. Sci. 1(2), 107–115 (2014). https://doi.org/10.1007/s40595-013-0013-2

    Article  Google Scholar 

  8. Do, T.-N.: Multi-class bagged proximal support vector machines for the imageNet challenging problem. In: Dang, T.K., Küng, J., Chung, T.M., Takizawa, M. (eds.) FDSE 2021. LNCS, vol. 13076, pp. 99–112. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-91387-8_7

    Chapter  Google Scholar 

  9. Do, T., Poulet, F.: Parallel multiclass logistic regression for classifying large scale image datasets. In: Advanced Computational Methods for Knowledge Engineering - Proceedings of 3rd International Conference on Computer Science, Applied Mathematics and Applications - ICCSAMA 2015, Metz, France, 11–13 May 2015, pp. 255–266 (2015)

    Google Scholar 

  10. Do, T.-N., Poulet, F.: Parallel learning of local SVM algorithms for classifying large datasets. In: Hameurlain, A., Küng, J., Wagner, R., Dang, T.K., Thoai, N. (eds.) Transactions on Large-Scale Data- and Knowledge-Centered Systems XXXI. LNCS, vol. 10140, pp. 67–93. Springer, Heidelberg (2017). https://doi.org/10.1007/978-3-662-54173-9_4

    Chapter  Google Scholar 

  11. Do, T.-N., Le Thi, H.A.: Training support vector machines for dealing with the imageNet challenging problem. In: Le Thi, H.A., Pham Dinh, T., Le, H.M. (eds.) MCO 2021. LNNS, vol. 363, pp. 235–246. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-92666-3_20

    Chapter  Google Scholar 

  12. Do, T., Tran-Nguyen, M.: Incremental parallel support vector machines for classifying large-scale multi-class image datasets. In: Future Data and Security Engineering - Third International Conference, FDSE 2016, Can Tho City, Vietnam, 23–25 Nov 2016, Proceedings, pp. 20–39 (2016)

    Google Scholar 

  13. Doan, T., Do, T., Poulet, F.: Large scale classifiers for visual classification tasks. Multimedia Tools Appl. 74(4), 1199–1224 (2015)

    Article  Google Scholar 

  14. Fan, R.E., Chang, K.W., Hsieh, C.J., Wang, X.R., Lin, C.J.: LIBLINEAR: a library for large linear classification. J. Mach. Learn. Res. 9(4), 1871–1874 (2008)

    MATH  Google Scholar 

  15. Glegola, W., Karpus, A., Przybylek, A.: Mobilenet family tailored for raspberry pi. In: Watróbski, J., Salabun, W., Toro, C., Zanni-Merk, C., Howlett, R.J., Jain, L.C. (eds.) Knowledge-Based and Intelligent Information & Engineering Systems: Proceedings of the 25th International Conference KES-2021, Virtual Event / Szczecin, Poland, 8–10 Sept 2021. Procedia Computer Science, vol. 192, pp. 2249–2258. Elsevier (2021)

    Google Scholar 

  16. He, C., Annavaram, M., Avestimehr, S.: Group knowledge transfer: federated learning of large CNNs at the edge. In: Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., Lin, H. (eds.) Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, 6–12 Dec 2020, virtual (2020)

    Google Scholar 

  17. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. arXiv:1512.03385 (2015)

  18. Iodice, G.M.: Running alexNet on raspberry pi with compute library (2018)

    Google Scholar 

  19. Kairouz, P., et al.: Advances and open problems in federated learning. Found. Trends Mach. Learn. 14(1–2), 1–210 (2021)

    Article  MATH  Google Scholar 

  20. Konečný, J., McMahan, B., Ramage, D.: Federated optimization: distributed optimization beyond the datacenter. arXiv:1511.03575 (2015)

  21. Koul, A., Ganju, S., Kasam, M.: Practical Deep Learning for Cloud, Mobile, and Edge. O’Reilly Media Inc, CA, USA (2019)

    Google Scholar 

  22. Kulkarni, S.A., Gurupur, V.P., Fernandes, S.L.: Introduction to IoT with Machine Learning and Image Processing using Raspberry Pi. Chapman and Hall/CRC, NY, USA (2020)

    Book  Google Scholar 

  23. Kurniawan, A.: IoT Projects with NVIDIA Jetson Nano. Apress, Berkeley, CA (2021). https://doi.org/10.1007/978-1-4842-6452-2

    Book  Google Scholar 

  24. LeCun, Y., Bottou, L., Bengio, Y., Haffner, P.: Gradient-based learning applied to document recognition. In: Proceedings of the IEEE, vol. 86, pp. 2278–2324 (1998)

    Google Scholar 

  25. Li, F., Perona, P.: A bayesian hierarchical model for learning natural scene categories. In: 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR 2005), 20–26 June 2005, San Diego, CA, USA. pp. 524–531 (2005)

    Google Scholar 

  26. Lowe, D.: Object recognition from local scale invariant features. In: Proceedings of the 7th International Conference on Computer Vision, pp. 1150–1157 (1999)

    Google Scholar 

  27. Lowe, D.: Distinctive image features from scale invariant keypoints. Int. J. Comput. Vis. 60, 91–110 (2004). https://doi.org/10.1023/B:VISI.0000029664.99615.94

  28. MacQueen, J.: Some methods for classification and analysis of multivariate observations. Berkeley Symp. Math. Statist. Prob. Univ. California Press 1, 281–297 (1967)

    MathSciNet  MATH  Google Scholar 

  29. Magid, S.A., Petrini, F., Dezfouli, B.: Image classification on IoT edge devices: profiling and modeling. Clust. Comput. 23(2), 1025–1043 (2020)

    Article  Google Scholar 

  30. Norris, D.J.: Machine Learning with the Raspberry Pi. Apress, Berkeley, CA (2020). https://doi.org/10.1007/978-1-4842-5174-4

    Book  Google Scholar 

  31. OpenMP Architecture Review Board: OpenMP application program interface version 3.0 (2008). www.openmp.org/mp-documents/spec30.pdf

  32. Pedregosa, F., et al.: Scikit-learn: machine learning in Python. J. Mach. Learn. Res. 12, 2825–2830 (2011)

    MathSciNet  MATH  Google Scholar 

  33. Perronnin, F., Sánchez, J., Liu, Y.: Large-scale image categorization with explicit data embedding. In: IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pp. 2297–2304 (2010)

    Google Scholar 

  34. Sculley, D.: Web-scale k-means clustering. In: Proceedings of the 19th International Conference on World Wide Web. p. 1177–1178. WWW 2010, Association for Computing Machinery, New York, NY, USA (2010). https://doi.org/10.1145/1772690.1772862

  35. Shalev-Shwartz, S., Singer, Y., Srebro, N.: Pegasos: Primal estimated sub-gradient solver for SVM. In: Proceedings of the Twenty-Fourth International Conference Machine Learning, pp. 807–814. ACM (2007)

    Google Scholar 

  36. Simonyan, K., Zisserman, A.: Very deep convolutional networks for large-scale image recognition. arXiv:1409.1556 (2014)

  37. Sivic, J., Zisserman, A.: Video google: a text retrieval approach to object matching in videos. In: 9th IEEE International Conference on Computer Vision (ICCV 2003), 14–17 October 2003, Nice, France, pp. 1470–1477 (2003)

    Google Scholar 

  38. Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., Wojna, Z.: Rethinking the inception architecture for computer vision. arXiv:1512.00567 (2015)

  39. Tan, M., Le, Q.V.: Efficientnetv2: smaller models and faster training (2021)

    Google Scholar 

  40. Vapnik, V.N.: The Nature of Statistical Learning Theory. Springer-Verlag (1995). https://doi.org/10.1007/978-1-4757-3264-1

  41. Vapnik, V., Bottou, L.: Local algorithms for pattern recognition and dependencies estimation. Neural Comput. 5(6), 893–909 (1993)

    Article  Google Scholar 

  42. Wu, J.: Power mean SVM for large scale visual classification. In: IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pp. 2344–2351 (2012)

    Google Scholar 

  43. Zhang, T., Gao, L., He, C., Zhang, M., Krishnamachari, B., Avestimehr, A.S.: Federated learning for the internet of things: applications, challenges, and opportunities. IEEE Internet Things Mag. 5(1), 24–29 (2022)

    Article  Google Scholar 

Download references

Acknowledgments

This work has received support from the College of Information Technology, Can Tho University. We would like to thank very much the Big Data and Mobile Computing Laboratory.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Thanh-Nghi Do.

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Do, TN., Tran-Nguyen, MT. (2022). ImageNet Challenging Classification with the Raspberry Pis: A Federated Learning Algorithm of Local Stochastic Gradient Descent Models. In: Dang, T.K., Küng, J., Chung, T.M. (eds) Future Data and Security Engineering. Big Data, Security and Privacy, Smart City and Industry 4.0 Applications. FDSE 2022. Communications in Computer and Information Science, vol 1688. Springer, Singapore. https://doi.org/10.1007/978-981-19-8069-5_9

Download citation

Keywords

Publish with us

Policies and ethics

Profiles

  1. Minh-Thu Tran-Nguyen