Control of an intelligent car based on OpenMV perception

Research Article
Open access

Control of an intelligent car based on OpenMV perception

Ziqin Ye 1* , Haohan Zhang 2 , Zixiang Wang 3 , Qiuhan Chen 4
  • 1 Harbin Institute of Technology    
  • 2 Harbin Institute of Technology    
  • 3 Harbin Institute of Technology    
  • 4 Harbin Institute of Technology    
  • *corresponding author 2022113217@stu.hit.edu.cn
Published on 4 February 2024 | https://doi.org/10.54254/2755-2721/35/20230382
ACE Vol.35
ISSN (Print): 2755-273X
ISSN (Online): 2755-2721
ISBN (Print): 978-1-83558-295-4
ISBN (Online): 978-1-83558-296-1

Abstract

This project presents an intelligent car system based on machine vision, which enables the car to perform a series of tasks through visual perception. The project utilizes an OpenMV camera and an Arduino microcontroller board, where the OpenMV camera captures and preprocesses images, and the processed data is then transmitted to the Arduino for further processing and recognition. In addition, the project incorporates the GoogleNet network for training and classifying the preprocessed images. The network is used to recognize common objects, and the model is optimized and tested accordingly. The results demonstrate a high accuracy in image recognition, making it applicable to visual perception in vehicles.

Keywords:

Intelligent Car, Machine Vision, OpenMV, Neural Networks

Export citation

1. Introduction

With the increasing number of automobile users in the 21st century, issues such as traffic congestion and safety accidents have become more prominent in road traffic. With the support of Internet of Vehicles (IoV) technology and artificial intelligence (AI) technology, autonomous driving technology can effectively coordinate travel paths and optimize itinerary planning, thereby greatly improving travel efficiency and reducing energy consumption to some extent. From a policy perspective, since 2022, various regions have continuously opened test roads for autonomous driving, and the Ministry of Industry and Information Technology has continuously improved relevant systems, which has laid a good foundation for the development of intelligent vehicles. With the continuous promotion of policy improvement, it is expected that the domestic intelligence rate will continue to increase rapidly [1].

Advancements in Intelligent Traffic Systems

In recent years, with the rapid development of urbanization, the number of motor vehicles has been increasing, which has not only brought great pressure to traffic management departments but also increased the risk of traffic accidents. Intelligent vehicles based on camera perception can perceive and analyze their surrounding environment through computer vision technology, thereby achieving precise recognition and control of target objects, thereby improving transportation efficiency and safety [2].

Providing Technological Support and Application Scenarios for Innovation in Intelligent Traffic

For example, in the field of urban express delivery, intelligent vehicles use machine vision technology to achieve autonomous recognition and delivery, thereby improving the efficiency and accuracy of express delivery. In intelligent parking management, intelligent vehicles can use machine vision technology to automatically find parking spaces, reducing the time and cost of searching for parking spaces.

Algorithms Used in Autonomous Driving

Research Status of Image Recognition in Autonomous Driving

Deep learning-based image recognition, which extracts features for classification, has the characteristics of high recognition rate and strong robustness [3]. Compared to traditional methods, Convolutional Neural Networks (CNNs) have many advantages in object recognition. With the advancement of hardware technology and the application of parallel computing tools such as graphics processors, the training and inference speed of CNNs have been significantly improved, making it one of the main methods for object recognition in the field of computer vision.

Neural Networks Used in Autonomous Driving

GoogleNet, proposed in 2014, is a 22-layer deep network that achieved significant improvements compared to the award-winning networks ZFNet in 2013 and AlexNet in 2012. Deep learning networks contain more parameters and are more prone to overfitting. Increasing the network size also increases the use of computational resources. To address these issues, GoogleNet uses 1x1 convolution kernels for dimensionality reduction, thereby further reducing computational complexity. Instead of using fully connected layers, GoogleNet uses global average pooling at the end of the network [4~6].

Inception is a method that combines multiple convolution and pooling operations into network modules to assemble the entire neural network structure on a module basis. GoogleNet is composed of multiple inception modules, which allows for deeper networks. The reduced-dimension inception block typically includes 1x1 convolution, 3x3 convolution, 5x5 convolution, and 3x3 max pooling, all of which are stacked together at the output from the previous iteration.

2. Research Content

This project aims to achieve route control of an intelligent vehicle through obstacle avoidance and decision planning. Specifically, the research will focus on the following aspects:

Figure 1. Information Transmission Flow Chart when the Vehicle Encounters Environmental Changes.

3. Implementation Plan

3.1. Using a Camera Image Sensor for Signal Transmission

OpenMV Camera integration: The intelligent obstacle avoidance vehicle designed in this project utilizes the OpenMV module for digital recognition, which is a convenient, low-power, and high-efficiency vision module. In the field of machine vision, OpenMV uses an embedded solution based on the STM32H743VI microcontroller, combining a high-definition camera module (OV7725) with a Python-driven machine vision module[7~9]. In this experiment, we will use OpenMV to control Arduino for vehicle control.

3.2. Using a Camera Image Sensor for Signal Transmission

Using GoogleNet convolutional neural network for image recognition. GoogleNet is a deep learning-based image recognition model, also known as Inception V1 [10].

First, we will build the framework of the vehicle. To achieve intelligent obstacle avoidance control based on camera perception, we will build a two-wheeled differential drive vehicle platform.

The vehicle will be equipped with an OpenMV as a vision sensor, capturing environmental image information in front of the vehicle. The control system of the vehicle is based on the STM32 microcontroller, which can recognize obstacles in front of the vehicle based on the image data obtained from OpenMV and perform obstacle avoidance control. Specifically, the mechanical structure of the vehicle includes two drive wheels, one omni-directional wheel, and the vehicle body. The drive wheels, driven by two DC reduction motors, can control the forward, backward, and turning motions of the vehicle. The omni-directional wheel ensures the stability of the vehicle.

4. Obstacle Avoidance Control

We have chosen an obstacle avoidance control method for intelligent vehicle based on convolutional neural network and PID control. We use the convolutional neural network to detect obstacles in the images and identify their types and orientations. The detection results and the current state of the vehicle are fed into the PID control algorithm to generate the obstacle avoidance control output. We have built a road obstacle dataset with multiple images of different types and corresponding annotations to train the neural network.

After customization, fine-tuning, and testing, the network is able to detect common obstacles that we have trained it on, such as cups, traffic cones, and achieve an accuracy rate of over 90%. Based on the orientation and type of the obstacles, the vehicle will generate a practical obstacle avoidance path. With the help of the line tracking module, the intelligent vehicle we have built can drive following the designated route effectively.

5. Car Model

Figure 2. Physical Image of the Car.

The car model is designed as depicted in the above diagram. It is equipped with a motor driver board, an Arduino development board, and an OpenMV visual recognition module. The model adopts a two-wheel drive system with differential steering. The PID algorithm is implemented on the model to calculate the required drive speed to reach the target and output PWM values to control the car's rotation speed.

6. Line Following Mode

In the line following mode, the OpenMV is programmed to recognize the predicted horizontal offset and vertical deviation angle of a black line segment captured within the camera's image range. The OpenMV sends the line segment signal to the Arduino main controller, which then makes corresponding decisions. By fine-tuning the steering sensitivity and feedback coefficients, the car can achieve effective line following performance.

Figure 3. Process Diagram of Car Tracking.

7. Obstacle Avoidance during Free Driving

7.1. Dynamic Object Recognition

Based on the visual recognition model installed, when the car identifies an object with the label "dynamic object" (in the experiment, different cups were used as substitutes for actual objects), the car executes a stop command to prevent accidents caused by the unpredictable trajectory of dynamic objects.

Figure 4. Car Executes Stop Command upon Recognizing Dynamic Object.

7.2. Static Object Recognition

Based on the visual recognition model installed, when the car identifies an object with the label "static object" (in the experiment, different cups were used as substitutes for actual objects), the car executes a detour command to avoid staying near static objects, thereby maintaining high efficiency in its movement.

Figure 5. Car Executes Detour Command upon Recognizing Static Object.

8. Test Results

Our method was tested under various obstacles and scenes (indoor and outdoor) to evaluate its robustness and generalization ability. To objectively measure the performance of the neural network's detection and recognition results, we designed a set of evaluation metrics. After conducting multiple tests and analyzing the results against each metric, we obtained the following table.

Table 1. Evaluation of Vehicle-mounted Model.

Success rate

Recognition rate

Score

92%

90%

91

86%

93%

89.5

88%

95%

91.5

93%

91%

92

The measurement approach for accuracy involves calculating the ratio of the difference between the programmed recognition distance and the actual recognition distance to the programmed distance. The tracking rate is determined by the deviation between the predefined trajectory (standard straight line) of the car and the actual motion trajectory, with the score being the arithmetic average of the two.

Through multiple experiments and tests, we have verified the performance of the intelligent obstacle avoidance system for our small car. In numerous trials, our intelligent car achieved an average obstacle recognition accuracy of over 92% and an average obstacle avoidance tracking rate close to 90%. It was able to detect obstacles within a range of 15 cm and initiate deceleration, stopping, or turning to avoid them. This demonstrates the effectiveness of our proposed solution, which can meet practical application requirements. The system performs stably in general indoor environments, although its performance slightly declines under complex lighting conditions such as nighttime or low light.

9. Discussion

1) Adoption of a convolutional neural network enables the detection and recognition of a wider range of obstacle types and provides more accurate obstacle information output.

2) The dataset we constructed provides abundant data for training, resulting in higher recognition accuracy.

3) The series of evaluation metrics we designed can comprehensively and accurately assess the system's performance.

In summary, we propose an obstacle avoidance control method for intelligent cars based on convolutional neural networks, which enables fast, accurate, and high-performance obstacle avoidance in complex environments. This method holds certain reference value for the future applications of autonomous vehicles.

10. Conclusion

In this study, we proposed an obstacle avoidance system for intelligent cars based on OpenMV and Arduino. The system utilizes the OpenMV camera to capture environmental images and performs image processing and obstacle detection using OpenMV. The Arduino is used to control the car's motion to achieve obstacle avoidance. Through this project, we familiarized ourselves with the image processing capabilities of OpenMV, learned about the control knowledge for intelligent cars, and effectively combined the two to create an autonomous obstacle avoidance intelligent car.

Although there are still some limitations in the current system, such as insufficient robustness in recognizing and positioning objects in complex environments, and relatively simple control strategies, the entire solution demonstrates the feasibility of intelligent cars based on visual perception and embedded control.


References

[1]. Yu, J. (2022). Analysis of the current status and development trends of China's autonomous driving industry, China leads the development of the first international standard for autonomous driving [EB/OL]. Huajing Intelligence Network, 2022-10-21. (In Chinese)

[2]. CCID Consulting. (2020). Can autonomous driving technology alleviate urban traffic congestion? [EB/OL]. https://www.zhihu.com/question/32271883/answer/1176645963, 2020-04-24. (In Chinese)

[3]. Jia Chuanwei. Optimized design of intelligent car obstacle avoidance based on deep learning [D]. Qingdao: Qingdao University of Science and Technology, 2020.

[4]. Yang, H., & Chen, H. (2023). Recognition and classification of Qin embroidery patterns based on GoogLeNet. Furniture and Interior Decoration, 30(5), 38-42. DOI: 10.16771/j.cn43-1247/ts.2023.05.007. (In Chinese)

[5]. Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, Andrew Rabinovich."Going deeper with convolutions."[M],Proceedings of the IEEE conference on computer vision and pattern recognition.2015.

[6]. Wang, L., Wei, C., & Chen, J. (2022). Design and implementation of a garbage classification car system based on OpenMV image recognition. Henan Science and Technology, 41(18), 15-20. DOI: 10.19968/j.cnki.hnkj.1003-5168.2022.18.003. (In Chinese)

[7]. Wang, B. (2015). Research on obstacle avoidance and path optimization for intelligent cars (Unpublished doctoral dissertation). Chongqing University of Technology, Chongqing, China. (In Chinese)

[8]. Feng Shu. Research on cooperative filtering recommendation model based on graph convolutional neural network [D]. Qingdao University of Technology, 2022.DOI:10.27263/d.cnki.gqudc.2022.000181.

[9]. Yue Qiu. Intelligent car design based on STM32[J]. Industrial Control Computer,2023,36(04):158-159.

[10]. NIE Jingxin,WANG Yihu,CHEN Mingpeng. Localized UAV trajectory replanning based on artificial potential field method[J]. Henan Science,2023,41(05):774-780.


Cite this article

Ye,Z.;Zhang,H.;Wang,Z.;Chen,Q. (2024). Control of an intelligent car based on OpenMV perception. Applied and Computational Engineering,35,134-140.

Data availability

The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.

Disclaimer/Publisher's Note

The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

About volume

Volume title: Proceedings of the 2023 International Conference on Machine Learning and Automation

ISBN:978-1-83558-295-4(Print) / 978-1-83558-296-1(Online)
Editor:Mustafa İSTANBULLU
Conference website: https://2023.confmla.org/
Conference date: 18 October 2023
Series: Applied and Computational Engineering
Volume number: Vol.35
ISSN:2755-2721(Print) / 2755-273X(Online)

© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license. Authors who publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See Open access policy for details).

References

[1]. Yu, J. (2022). Analysis of the current status and development trends of China's autonomous driving industry, China leads the development of the first international standard for autonomous driving [EB/OL]. Huajing Intelligence Network, 2022-10-21. (In Chinese)

[2]. CCID Consulting. (2020). Can autonomous driving technology alleviate urban traffic congestion? [EB/OL]. https://www.zhihu.com/question/32271883/answer/1176645963, 2020-04-24. (In Chinese)

[3]. Jia Chuanwei. Optimized design of intelligent car obstacle avoidance based on deep learning [D]. Qingdao: Qingdao University of Science and Technology, 2020.

[4]. Yang, H., & Chen, H. (2023). Recognition and classification of Qin embroidery patterns based on GoogLeNet. Furniture and Interior Decoration, 30(5), 38-42. DOI: 10.16771/j.cn43-1247/ts.2023.05.007. (In Chinese)

[5]. Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, Andrew Rabinovich."Going deeper with convolutions."[M],Proceedings of the IEEE conference on computer vision and pattern recognition.2015.

[6]. Wang, L., Wei, C., & Chen, J. (2022). Design and implementation of a garbage classification car system based on OpenMV image recognition. Henan Science and Technology, 41(18), 15-20. DOI: 10.19968/j.cnki.hnkj.1003-5168.2022.18.003. (In Chinese)

[7]. Wang, B. (2015). Research on obstacle avoidance and path optimization for intelligent cars (Unpublished doctoral dissertation). Chongqing University of Technology, Chongqing, China. (In Chinese)

[8]. Feng Shu. Research on cooperative filtering recommendation model based on graph convolutional neural network [D]. Qingdao University of Technology, 2022.DOI:10.27263/d.cnki.gqudc.2022.000181.

[9]. Yue Qiu. Intelligent car design based on STM32[J]. Industrial Control Computer,2023,36(04):158-159.

[10]. NIE Jingxin,WANG Yihu,CHEN Mingpeng. Localized UAV trajectory replanning based on artificial potential field method[J]. Henan Science,2023,41(05):774-780.