Optimizing Parking Space Classification: Distilling Ensembles into Lightweight Classifiers

Paulo Luza Alves,André Hochuli,Luiz Eduardo de Oliveira,Paulo Lisboa de Almeida
2024-10-08
Abstract:When deploying large-scale machine learning models for smart city applications, such as image-based parking lot monitoring, data often must be sent to a central server to perform classification tasks. This is challenging for the city's infrastructure, where image-based applications require transmitting large volumes of data, necessitating complex network and hardware infrastructures to process the data. To address this issue in image-based parking space classification, we propose creating a robust ensemble of classifiers to serve as Teacher models. These Teacher models are distilled into lightweight and specialized Student models that can be deployed directly on edge devices. The knowledge is distilled to the Student models through pseudo-labeled samples generated by the Teacher model, which are utilized to fine-tune the Student models on the target scenario. Our results show that the Student models, with 26 times fewer parameters than the Teacher models, achieved an average accuracy of 96.6% on the target test datasets, surpassing the Teacher models, which attained an average accuracy of 95.3%.
Computer Vision and Pattern Recognition,Machine Learning
What problem does this paper attempt to address?
This paper attempts to solve the problem of image - based parking lot occupancy classification in smart cities, especially how to efficiently deploy machine - learning models on resource - constrained edge devices (such as smart cameras). Specifically, the paper mainly addresses the following issues: 1. **Challenges of large - scale data transmission and processing**: - In the smart - city environment, a large number of cameras will generate vast amounts of image data, and these data usually need to be transmitted to a central server for processing. This not only increases the pressure on network bandwidth but also requires complex hardware infrastructure to support data processing. - To solve this problem, the paper proposes a new method, that is, transferring the knowledge of the large Teacher model to the lightweight Student model through the Knowledge Distillation technique, so that the Student model can be directly deployed on edge devices for real - time classification. 2. **Reducing the dependence on manual annotation**: - Traditional lightweight models usually need to be trained with the real labels of the target data set, which requires a large amount of manual annotation work in practical applications and is difficult to scale. - The paper proposes to use the pseudo - labels generated by the Teacher model to train the Student model, thereby avoiding the need for manual annotation and improving the scalability of the system. 3. **Improving the accuracy of lightweight models**: - Through experimental verification, the paper shows that the Student model fine - tuned with pseudo - labels can still reach or even exceed the classification accuracy of the Teacher model (with an average accuracy of 96.6% and 95.3% respectively) when the number of parameters is significantly reduced (26 times less than that of the Teacher model). ### Main research questions To verify the proposed scheme, the paper sets the following research questions: - **RQ1**: How does the accuracy of the lightweight Student classifier compare with that of the central Teacher model? - **RQ2**: How many images need to be classified by the Teacher model to generate enough pseudo - labels to fine - tune the Student model? - **RQ3**: How does the accuracy of the Student model fine - tuned with pseudo - labels compare with that of the Student model assumed to be fine - tuned with real labels? ### Method overview The method proposed in the paper includes the following steps: 1. **Create a Teacher model**: Train a powerful ensemble classifier as a Teacher model, which can handle image classification tasks from any parking lot. 2. **Generate pseudo - labels**: When a new camera is deployed, the images it collects will be sent to the central server, classified by the Teacher model, and generate pseudo - labels. 3. **Fine - tune the Student model**: Use the generated pseudo - labels to fine - tune the lightweight Student model, so that it can adapt to a specific environment and be deployed on edge devices. Through this method, the paper successfully solves the efficiency and scalability problems of parking lot occupancy classification in smart cities, providing a feasible solution for large - scale deployment.