Riding passing method, device, equipment, medium and product
By using a comprehensive verification model on the gate terminal to verify the passage of the elderly, the problem of inconvenience in the elderly when riding a bus is solved, the passage efficiency is improved and the risk of theft and loss of discount cards is reduced.
Patent Information
- Application Number
- CN202510495502.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-05-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The elderly cannot pass quickly and easily when riding a car, and the existing discount cards are stolen, inconvenient to carry and easy to lose.
After receiving the ride request at the gate, the comprehensive verification model is used to perform pass verification. The model is constructed by the face detection model, the pre-trained age prediction model and the final age prediction model. After verification is passed, the floodgate is opened.
It solves the problem that the elderly cannot pass quickly and conveniently when riding a bus, improves the efficiency of riding a bus, and avoids the risk of theft and loss of discount cards.
Smart Images

Figure CN120048036A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of public transportation technology, and in particular to a method, device, equipment, medium and product for traveling by bus. Background Art
[0002] At present, in the subway scene, there are two main ways for elderly passengers to enter and exit the station: one is to register at the subway side door with a valid ID and enter the station and ride for free; the other is for elderly people with local household registration to apply for a discount card and swipe the card to ride for free when entering and exiting the station.
[0003] However, when using their ID cards to register for a ride, the elderly need to go to the side door on the hall level of the subway station to register for entry and exit. This method is not conducive to finding the elderly with limited mobility, and there may be a risk of the elderly getting lost. Using discount cards to swipe for free rides may be misused by others, resulting in financial losses for the subway operator. In addition, discount cards are physical cards, which are inconvenient to carry and easy to lose for some elderly people.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a method, device, equipment, medium and product for passing through a vehicle, aiming to solve the technical problem that the elderly cannot pass quickly and conveniently when riding in a vehicle.
[0006] To achieve the above purpose, the present application proposes a vehicle passage method, which is applied to a gate end and includes: Receive a ride request from a user; Based on the ride request, the user is verified through a comprehensive verification model to obtain a verification result, wherein the comprehensive verification model is constructed by a face detection model, a pre-trained age prediction model, and a final age prediction model; When the verification result is that the verification is passed, the gate is opened for the user to pass.
[0007] In one embodiment, before the step of performing a pass verification on the user based on the ride request through a comprehensive verification model to obtain a verification result, the method further includes: Receive a card swiping request from a cardholder; Read the card swiping request to obtain user information of the cardholder, the user information including user age and user gender; The face of the cardholder is collected by the face detection model to obtain a face image of the cardholder; Modifying the initial age prediction model according to the cardholder's facial image to obtain a final age prediction model; The face detection model, the pre-trained age prediction model and the final age prediction model are integrated to obtain a comprehensive verification model.
[0008] In one embodiment, the step of reading the card swiping request to obtain the user information of the card holder includes: Read the card information of the cardholder according to the card swiping request; If age information and gender information are stored in the card information, extract the age information and gender information to obtain user information; If the age information and gender information are not stored in the card information, an information call request is sent to the cloud platform according to the card number of the card information. The cloud platform queries the user information of the cardholder based on the information call request and sends the user information to the gate end.
[0009] In one embodiment, the step of collecting the face of the cardholder through the face detection model to obtain the face image of the cardholder includes: According to the card swiping request, an image of the card holder is captured by a camera device to obtain an initial image; Performing face detection on the initial image using the face detection model to obtain a detection result; When there is more than one face image in the detection result, selecting the largest face in the detection result as the target face, and performing image extraction based on the target face to obtain an initial face image; The initial facial image is normalized to obtain a facial image of the cardholder.
[0010] In one embodiment, the step of modifying the initial age prediction model according to the cardholder user's facial image to obtain a final age prediction model comprises: Performing gender detection on the cardholder's facial image using a gender prediction model to obtain a gender detection result; Performing age detection on the cardholder's facial image using the initial age prediction model to obtain an age detection result; Comparing the age detection result with the user age to obtain a first comparison result; Comparing the gender detection result with the gender of the user to obtain a second comparison result; In the case where the first comparison result and / or the second comparison result fails, the failed first comparison result and / or the second comparison result is sent to a manual confirmation terminal for false detection judgment to obtain a judgment result; The initial age prediction model is modified according to the judgment result to obtain a final age prediction model.
[0011] In one embodiment, the step of performing pass verification on the user through a comprehensive verification model based on the ride request to obtain a verification result includes: Acquire an initial face image through the face detection model, and preprocess the initial face image to obtain several frames of face images; Inputting the plurality of frames of face images into the final age prediction model to obtain a first user age prediction result; Performing pass verification on the first user age prediction result; If the age prediction result of the first user meets the applicable age standard, the verification result is obtained as verification passed; If the first user age prediction result does not meet the use age standard, the age prediction is performed on the several frames of face images through the pre-trained age prediction model to obtain a second age prediction result, and when the second age prediction result meets the use age standard, the verification result is obtained as verification passed.
[0012] In addition, to achieve the above-mentioned purpose, the present application also proposes a vehicle passage device applied to the gate end, the device comprising: A receiving module, used for receiving a ride request from a user; A verification module, configured to perform a pass verification on the user based on the ride request through a comprehensive verification model to obtain a verification result, wherein the comprehensive verification model is constructed by a face detection model, a pre-trained age prediction model, and a final age prediction model; The passage module is used to open the gate for the user to pass when the verification result is passed.
[0013] In addition, to achieve the above-mentioned purpose, the present application also proposes a vehicle-passing device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the vehicle-passing method as described above.
[0014] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the vehicle-passing method described above are implemented.
[0015] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the vehicle travel method as described above.
[0016] One or more technical solutions proposed in this application have at least the following technical effects: The embodiment of the present application proposes a method, device, equipment, medium and product for passing a vehicle, which receives a user's request for a vehicle; based on the request for a vehicle, the user is verified through a comprehensive verification model to obtain a verification result, wherein the comprehensive verification model is constructed by a face detection model, a pre-trained age prediction model and a final age prediction model; and if the verification result is a passed verification, the gate is opened for the user to pass. Thus, based on the user's request for a vehicle, the user is verified through a comprehensive verification model pre-acquired by a face detection model, a pre-trained age prediction model and a final age prediction model, and if the verification result is a passed verification, the gate is opened for the user to pass, which solves the problem that the elderly cannot pass quickly and conveniently when riding a vehicle, and improves the efficiency of the elderly passing when riding a vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 A flow chart of the first embodiment of the method for taking a bus in this application; Figure 2 A flow chart of the second embodiment of the method for taking a bus in this application; Figure 3 This is a flow chart of the model building phase involved in the method for applying for a ride pass; Figure 4 This is a flow chart of the model usage phase involved in this application for a ride pass method; Figure 5 This is a schematic diagram of the module structure of the vehicle access device according to an embodiment of the present application; Figure 6 Schematic diagram of the equipment structure of the hardware operating environment involved in the vehicle travel method in the embodiment of the present application.
[0020] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0021] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0022] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0023] The main solution of the embodiment of the present application is: receiving a card swiping request from a cardholder; The card swipe request is read to obtain the user information of the cardholder, the user information including the user age and the user gender; the face of the cardholder is collected through the face detection model to obtain the face image of the cardholder; the initial age prediction model is modified according to the face image of the cardholder to obtain the final age prediction model; the face detection model, the pre-trained age prediction model and the final age prediction model are integrated to obtain a comprehensive verification model. The card information of the cardholder is read according to the card swipe request; if the age information and gender information are stored in the card information, the age information and gender information are extracted to obtain the user information; if the age information and gender information are not stored in the card information, an information call request is sent to the cloud platform according to the card number of the card information, and the cloud platform queries the user information of the cardholder based on the information call request, and sends the user information to the gate end. According to the card swipe request, the cardholder user is imaged through a camera device to obtain an initial image; the initial image is face detected through the face detection model to obtain a detection result; when there are more than one face images in the detection result, the largest face in the detection result is selected as the target face, and image extraction is performed based on the target face to obtain an initial face image; the initial face image is normalized to obtain a cardholder user face image. The cardholder user face image is gender detected through a gender prediction model to obtain a gender detection result; the cardholder user face image is age detected through the initial age prediction model to obtain an age detection result; the age detection result is compared with the user age to obtain a first comparison result; the gender detection result is compared with the user gender to obtain a second comparison result; in the case where the first comparison result and / or the second comparison result fail, the first comparison result and / or the second comparison result that fail are sent to the manual confirmation end for misdetection judgment to obtain a judgment result; the initial age prediction model is model corrected according to the judgment result to obtain a final age prediction model. An initial face image is obtained through the face detection model, and the initial face image is preprocessed to obtain a plurality of face image frames; the plurality of face image frames are input into the final age prediction model to obtain a first user age prediction result; the first user age prediction result is pass-verified; if the first user age prediction result meets the applicable age standard, a verification result is obtained that the verification is passed; if the first user age prediction result does not meet the use age standard, age prediction is performed on the plurality of face image frames through the pre-trained age prediction model to obtain a second age prediction result, and when the second age prediction result meets the use age standard, a verification result is obtained that the verification is passed.Thus, the problem that the elderly cannot pass through the bus quickly and conveniently is solved, the elderly can pass through the bus, and the efficiency of the elderly passing through the bus is improved. Based on the scheme of the present invention, a method for passing through the bus is designed based on the problem that the elderly are easily lost, lose their cards, and are inconvenient when using their ID cards or discount cards to pass through the bus, and the elderly cannot pass through the bus quickly and conveniently, thus the efficiency is low. The effectiveness of the method for passing through the bus of the present invention is verified when the elderly pass through the bus, and finally the efficiency of the elderly passing through the bus by the method of the present invention is significantly improved.
[0024] In this embodiment, for the convenience of description, the following description is made with the vehicle access device as the execution subject.
[0025] According to the existing technology, there are mainly two ways for elderly passengers to enter and exit the station. One is to register at the side door of the subway with a valid ID card and enter the station and ride for free. The other is that the elderly with local household registration can apply for a discount card and swipe the card to ride for free when entering and exiting the station. However, when using the ID card to register for riding, the elderly need to go to the side door on the hall level of the subway station to register for entry and exit. This method is not conducive to finding the elderly with limited mobility, and there may be a risk of the elderly getting lost. The method of swiping the discount card for free to ride may be stolen by others, resulting in financial losses for the subway operator. In addition, the discount card is a physical card, which is inconvenient to carry and easy to lose for some elderly people.
[0026] The present application provides a solution. When a boarding request is received at the gate, the passenger is verified through a comprehensive verification model including a face detection model, a pre-trained age prediction model and a final age prediction model. After the verification is passed, the gate is opened for the passenger to pass, providing users with better services.
[0027] As can be seen from the above embodiments, the present application receives a ride request from a user; based on the ride request, the user is verified through a comprehensive verification model to obtain a verification result, wherein the comprehensive verification model is constructed by a face detection model, a pre-trained age prediction model, and a final age prediction model; and when the verification result is a passed verification, the gate is opened for the user to pass. Thus, based on the user's ride request, the user is verified through a comprehensive verification model pre-acquired by a face detection model, a pre-trained age prediction model, and a final age prediction model, and when the verification result is a passed verification, the gate is opened for the user to pass, which solves the problem that the elderly cannot pass quickly and conveniently when riding, and improves the efficiency of the elderly passing when riding.
[0028] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a vehicle access device, etc. The following takes the vehicle access device as an example to illustrate this embodiment and the following embodiments.
[0029] Based on this, the embodiment of the present application provides a method for passing by a vehicle, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the vehicle travel method of the present application.
[0030] In this embodiment, the vehicle passing method is applied to the gate end, and the method includes steps S01 to S03: Step S01, receiving a ride request from a user; Before explaining this embodiment, it should be clear that in this application, data involving personal privacy such as facial photos, age, gender, etc., when used in specific products or technologies, need to obtain user permission or consent, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions. In the subway scenario of the prior art, there are mainly two ways for elderly passengers to enter and exit the station: one is to register at the side door of the subway with a valid identity document and enter the station and ride for free; the other is for the elderly with local household registration to apply for a discount card, which can be swiped for free when entering and exiting the station.
[0031] Although both of the above-mentioned solutions can realize free rides for the elderly, when using their ID cards to register for rides, the elderly need to go to the side door on the subway station hall level to register for entry and exit. This method has the following problems: ① The side door set up at each station is generally located in the middle of the station hall level, and the exit gates are generally located on both sides of the station hall level. For the elderly who need to be accompanied by their family members when traveling, it will cause inconvenience when exiting the station, especially at stations with large passenger flow, and there may even be a risk of the elderly getting lost; ② For some large transfer stations, the side door location is often difficult to find, which is not friendly to the elderly; ③ The current paper registration method may lead to the leakage of registration information of elderly users.
[0032] The following are the main problems with using a discount card to ride for free: ① Fraudulent use leads to financial losses for subway operators. The current way to apply for discount cards often focuses more on application than use. That is, the elderly are required to provide relevant materials when applying, and the application is completed after review, but the elderly information is not verified when using the card. As a result, some discount cards are used by family members, or the cards are not reported lost and replaced in time after being lost, and are stolen by others, resulting in financial losses for subway operators. ② A discount card is essentially a physical card. For some elderly people, it is inconvenient to carry and easy to lose.
[0033] Therefore, in this embodiment, in order to solve the above-mentioned problem, the user's boarding request will be received at the gate end first. In actual use, the boarding request can be understood as the user approaching the gate end, that is, the identification module of the gate end (such as a camera and an infrared sensor) recognizes that the user has stayed in front of the passageway of the gate end for a certain period of time, and it will be considered that the user's boarding request has been received.
[0034] Step S02, based on the ride request, the user is verified through a comprehensive verification model to obtain a verification result, wherein the comprehensive verification model is constructed by a face detection model, a pre-trained age prediction model and a final age prediction model; After determining that the user has a need to ride, the user will be verified through a pre-acquired comprehensive verification model. The user in this embodiment refers to a user over 60 years old, who may or may not hold a discount card. The comprehensive verification model in this embodiment includes a face detection model, a pre-trained age model, and a final age prediction model. Through the integration of these three models, a comprehensive verification model is obtained that is ultimately used to determine whether to pass.
[0035] Step S03, when the verification result is that the verification is passed, the gate is opened to allow the user to pass.
[0036] The verification result obtained through the comprehensive verification model may be passed or failed. If the verification is passed, it means that the current user meets the free standards (that is, an elderly person over 60 years old), and the gate will open the gate for the user to pass.
[0037] The verification result may also show that the verification fails. In this case, the gate is refused to open and the gate prompts the user to go to the side door for manual verification. Considering that the elderly may not be able to distinguish the instructions of the gate, the corresponding prompt will also be sent to the staff closest to the gate, so that the subsequent people passing through the gate will not be affected, thereby improving the overall efficiency of the gate passage.
[0038] Specifically, the above-mentioned comprehensive verification model is constructed by a face detection model, a pre-trained age prediction model and a final age prediction model. Therefore, in step S02, based on the ride request, the user is verified through the comprehensive verification model. Before obtaining the verification result, the method further includes: Step S0201, receiving a card swiping request from a cardholder; Step S0202, reading the card swiping request to obtain user information of the card holder, the user information including user age and user gender; Step S0203, collecting the face of the cardholder through the face detection model to obtain a face image of the cardholder; Step S0204, modifying the initial age prediction model according to the cardholder's facial image to obtain a final age prediction model; Step S0205, integrating the face detection model, the pre-trained age prediction model and the final age prediction model to obtain a comprehensive verification model.
[0039] Before the comprehensive verification model is used, the specific model needs to be trained and optimized. If the model is trained and optimized for all users, the efficiency of passage may be significantly reduced. Therefore, the model optimization in this embodiment is mainly aimed at users holding discount cards, especially users holding senior citizen discount cards. After the gate machine receives the card swiping request from the cardholder, it will read the card swiping request to obtain the user information of the cardholder, and then the user information of the cardholder can be temporarily stored in the gate machine. The user information here includes at least the user's age, user gender, discount card number, etc.
[0040] Subsequently, the face detection model in the comprehensive verification model is used to collect the face of the cardholder to obtain the face image of the cardholder. Subsequently, the initial age prediction model is corrected based on the face image of the cardholder to obtain the final age prediction model.
[0041] It should be clear that the user's travel needs also need to be considered during the model training and optimization process. Therefore, after obtaining the cardholder's user information, the cardholder's facial image will be predicted through the optimized age prediction model to obtain the cardholder's predicted age. The cardholder's facial image will also be predicted using the gender prediction model to obtain the cardholder's predicted gender. The predicted age and predicted gender are then verified using the previously obtained cardholder's user information. If the gender prediction result is consistent with the actual gender and the average age detection result is >= 60 years old, the gate will be automatically opened to allow passage. If the gender detection result is inconsistent with the actual gender, or the average age detection result is < 60 years old, the gate will be refused to open, and the gate will prompt "The test failed. If you have any questions, please go to the customer service room for processing." The station staff in the customer service room will manually determine whether to open the gate. At the same time, after the elderly leave the gate, the gate will delete the facial photo information locally in time to ensure the user's privacy and security.
[0042] After the initial age prediction model is corrected, a final age prediction model with higher accuracy can be obtained. However, in actual use, there are people who do not hold a card and take the bus. At this time, in order to ensure that the comprehensive verification model covers a wider range of users, the face detection model, the pre-trained age prediction model and the final age prediction model are integrated to obtain a comprehensive verification model.
[0043] In the above-mentioned embodiment, the age prediction model is trained and optimized through the user information and facial image of the cardholder, so that the recognition effect in the subsequent use is faster and more accurate, thereby improving the efficiency of the elderly when riding.
[0044] More specifically, the above step S02, based on the ride request, performs a pass verification on the user through a comprehensive verification model, and the step of obtaining a verification result includes: Step S021, obtaining an initial face image through the face detection model, and preprocessing the initial face image to obtain a plurality of frames of face images; Step S022, inputting the plurality of frames of face images into the final age prediction model to obtain a first user age prediction result; Step S023, performing pass verification on the first user age prediction result; Step S024: if the first user age prediction result meets the applicable age standard, the verification result is obtained as verification passed; Step S025, if the first user age prediction result does not meet the use age standard, then use the pre-trained age prediction model to perform age prediction on the several frames of face images to obtain a second age prediction result, and when the second age prediction result meets the use age standard, obtain a verification result of verification passed.
[0045] After each startup, the gate automatically loads the comprehensive verification model, and then when receiving the user's boarding request, it calls the face detection model for image processing. That is, when the user stops in front of the gate, the camera at the gate end will capture the facial image information and take the front and back 3 frames for preprocessing, including format conversion, face identification and normalization, etc. In this embodiment, 3 frames are used for processing, and 6 frames can also be used in other embodiments, that is, 4 frames of front face images, 1 frame of left face image and 1 frame of right face image of the user can be taken.
[0046] After obtaining the user's face image, the final age prediction model is called for judgment, and the preprocessed face image is input into the final age prediction model for age detection to obtain 3 age values. The average of the 3 age detection values is used as the age detection result of the face image to be detected.
[0047] During the verification process, if the average age test result is >= 60 years old, the verification result is passed, and the gate is automatically opened to allow passage; If the mean value of the age detection result is <60 years old, the age pre-training model will be called for detection. When the mean value of the results obtained by the age pre-training model is >=60 years old, the verification result is passed. At this time, the gate is automatically opened to allow passage. If the mean value of the results obtained by the age pre-training model is still <60 years old, the verification result is failed and the gate is refused to open. The gate machine prompts the user to go to the side door for manual verification. At the same time, after the elderly leave, the gate machine deletes the facial photo information locally in time.
[0048] In this embodiment, the final age prediction model that has been trained and optimized is used to predict age to verify whether the user is allowed to pass, which can greatly improve the efficiency of elderly people passing through the vehicle. In addition, a pre-trained age prediction model is added in this embodiment as a backup, which provides a broader prediction capability for faces that are not used as training sets.
[0049] This embodiment adopts the above scheme, specifically by receiving a user's ride request; based on the ride request, the user is verified through a comprehensive verification model to obtain a verification result, and the comprehensive verification model is constructed by a face detection model, a pre-trained age prediction model, and a final age prediction model; if the verification result is a passed verification, the gate is opened for the user to pass. Thus, based on the user's ride request, the user is verified through a comprehensive verification model pre-acquired by a face detection model, a pre-trained age prediction model, and a final age prediction model, and if the verification result is a passed verification, the gate is opened for the user to pass, which solves the problem that the elderly cannot pass quickly and conveniently when riding, and improves the efficiency of the elderly passing when riding.
[0050] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 In step S0202, in the step of reading the card swiping request to obtain the user information of the card holder, the bus passing method further includes steps S02021 to S02023: Step S02021, reading the card information of the cardholder according to the card swiping request; Step S02022: if the card information stores age information and gender information, extract the age information and gender information to obtain user information; Step S02023, if the age information and gender information are not stored in the card information, an information call request is sent to the cloud platform according to the card number of the card information, and the cloud platform queries the user information of the cardholder based on the information call request and sends the user information to the gate end.
[0051] In order to improve the accuracy of the initial age prediction model, when the cardholder swipes the card, the gate terminal asynchronously reads the gender and age information stored in the card and temporarily stores it in the gate terminal. Taking into account the situation where the gender and age information is not written in the card, the current card number is sent to the subway cloud platform, and the discount card information query system is called through the subway cloud platform to query the user's age and gender information, and the age and gender information is returned to the gate end for temporary storage.
[0052] Therefore, obtaining accurate data before the model starts training and optimization can help improve the accuracy and speed of subsequent age prediction.
[0053] Specifically, in the above embodiment, the step S0203, collecting the face of the cardholder through the face detection model to obtain the face image of the cardholder, includes: Step S02031, according to the card swiping request, an image of the card holder is captured by a camera device to obtain an initial image; Step S02032, performing face detection on the initial image using the face detection model to obtain a detection result; Step S02033, when there is more than one face image in the detection result, selecting the largest face in the detection result as the target face, and performing image extraction based on the target face to obtain an initial face image; Step S02034, normalize the initial facial image to obtain a facial image of the cardholder.
[0054] When a user swipes a discount card at the gate, the camera at the gate will capture the facial image information (i.e. the initial image, which may contain one face or multiple faces).
[0055] The initial image is then converted into a format supported by the model, and the number of faces in the image is determined. If there are more than one face, the largest face is automatically selected for extraction based on the principle that the front is larger and the back is smaller in the image, thus obtaining the initial face image.
[0056] Finally, the size, brightness, and color of the extracted face image are normalized and then input into the initial age prediction model and gender prediction model for further processing.
[0057] More specifically, in the above embodiment, the step S0204, in which the initial age prediction model is corrected according to the cardholder's facial image to obtain the final age prediction model, includes: Step S02041, performing gender detection on the cardholder's facial image using a gender prediction model to obtain a gender detection result; Step S02042, performing age detection on the cardholder's facial image using the initial age prediction model to obtain an age detection result; Step S02043, comparing the age detection result with the user's age to obtain a first comparison result; Step S02044, comparing the gender detection result with the gender of the user to obtain a second comparison result; Step S02045, when the first comparison result and / or the second comparison result fails, the failed first comparison result and / or the second comparison result is sent to the manual confirmation end for false detection judgment to obtain a judgment result; Step S02046, modifying the initial age prediction model according to the judgment result to obtain a final age prediction model.
[0058] First, the gender prediction model is called for judgment, and the preprocessed face image is input into multiple open source gender prediction models to obtain multiple gender detection values. Then, if the gender detection values output by each model are consistent, the gender prediction result is obtained. If the gender detection values output by each model are inconsistent, the detection values are put into the voting machine for voting, and the one with more values is taken as the gender prediction result.
[0059] Subsequently, the age prediction model is called for judgment, and the preprocessed face image is input into multiple open source age prediction models to obtain multiple age detection values, and the average of the multiple age detection values is used as the age detection result of the face image to be detected.
[0060] Then, the gender detection result and age detection result are compared with the actual gender and age of the cardholder temporarily stored at the gate. If the gender detection result is consistent with the actual gender and the average age detection result is >= 60 years old, the first comparison result is a positive comparison, and the gate is automatically opened to allow passage. If the gender detection result is inconsistent with the actual gender or the average age detection result is < 60 years old, the second comparison result is an abnormal comparison, and the gate is refused to open. The gate prompts "The test failed. If you have any questions, please go to the customer service room for processing." The station staff in the customer service room manually determines whether to open the gate. After the elderly leave, the gate deletes the facial photo information and user information locally in a timely manner.
[0061] Finally, when the station staff manually determines that it is indeed a false detection, the station system will store the judgment results of each use of the gender and age prediction model and the results manually marked by the station staff in the background, and the model will be corrected to obtain the final age prediction model.
[0062] This embodiment adopts the above scheme, specifically by reading the card information of the cardholder according to the card swiping request; if the card information stores age information and gender information, extract the age information and gender information to obtain user information; if the card information does not store age information and gender information, send an information call request to the cloud platform according to the card number of the card information, and the cloud platform queries the user information of the cardholder based on the information call request, and sends the user information to the gate end. Thus, based on the user's boarding request, the user is verified through the comprehensive verification model pre-acquired by the face detection model, the pre-trained age prediction model and the final age prediction model, and the gate is opened for the user to pass when the verification result is verification passed, which solves the problem that the elderly cannot pass quickly and conveniently when riding, and improves the efficiency of the elderly passing when riding.
[0063] For example, in order to help understand the implementation process of the method for taking a bus obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 3 , Figure 3 A brief flow chart of a method for taking a bus is provided, specifically: During the model building phase: (1) After each startup, the gate automatically loads the face detection model, gender prediction model and initial age prediction model; (2) Call the face detection model to process the image. When the user swipes the discount card at the gate, the camera at the gate will capture the face image information for preprocessing. The preprocessing is divided into the following steps: ① Convert the face image into a format supported by the model; ② Determine the number of faces in the image. If there are more than one face, automatically select the largest face for extraction based on the principle that the front is larger and the back is smaller in the image; ③ Normalize the size, brightness, and color of the extracted face image and input it into the initial age prediction model and gender prediction model; (3) When swiping the card, the gate terminal asynchronously reads the gender and age information stored in the card and temporarily stores it in the gate terminal. If the gender and age information is not written in the card, the current card number is sent to the subway cloud platform, and the subway cloud platform calls the discount card information query system to query the user's age and gender information, and returns the age and gender information to the gate terminal for temporary storage; (4) Calling the gender prediction model for judgment: Input the preprocessed face image into multiple open source gender prediction models to obtain multiple gender detection values: ① If the gender detection values output by each model are consistent, proceed to the next step of processing; ② If the gender detection values output by each model are inconsistent, the detection values are put into the voting machine for voting, and the one with more values is taken as the final gender detection result; (5) Calling the initial age prediction model for judgment: Inputting the preprocessed face image into multiple open source age prediction models to obtain multiple age detection values, and using the average of the multiple age detection values as the age detection result of the face image to be detected; (5) Compare the gender test results and age test results with the actual gender and age of the discount card temporarily stored at the gate: ① If the gender test result is consistent with the actual gender and the average age test result is >= 60 years old, the gate will automatically open to allow passage; ② If the gender test result is inconsistent with the actual gender, or the average age test result is less than 60 years old, the gate will be refused to open, and the gate machine will prompt "Test failed, if you have any questions, please go to the customer service room for processing", and the station staff in the customer service room will manually determine whether to open the gate; (6) After the elderly person leaves, the gate machine will delete the facial photo information in a timely manner; (7) When the station staff manually determines that it is indeed a false detection, the station system will store the judgment results of each use of the gender and initial age prediction model and the results manually marked by the station staff in the background, correct the model, and form the final age prediction model; (8) The final age prediction model, the pre-trained age prediction model and the face detection model are integrated to obtain a comprehensive verification model.
[0064] The model is used in the following stages: Figure 4 As shown: (1) After each startup, the gate automatically loads the comprehensive verification model, namely the face detection model, the age pre-training model, and the final age prediction model obtained in the model training phase; (2) Call the face detection model to perform image processing. When the user stops in front of the gate, the camera at the gate will capture the face image information and take the three frames before and after for preprocessing. The preprocessing is divided into the following steps: ① Convert the face image into a format supported by the model; ② Determine the number of faces in the image. If there are more than one face, automatically select the largest face for extraction based on the principle that the front is larger and the back is smaller in the image; ③ Normalize the size, brightness, and color of the extracted face image and input it into the initial age prediction model for age judgment; (3) Call the final age prediction model for judgment: Input the three frames of preprocessed face images into the final age prediction model for age detection, obtain three age values, and use the average of the three age detection values as the age detection result of the face image to be detected; ① If the average age test result is >= 60 years old, the gate will automatically open to allow passage; ② If the mean age detection result is less than 60 years old, the pre-trained age model is called for detection. If the mean age detection result is still less than 60 years old, the gate is refused to open, and the gate machine prompts the user to go to the side gate for manual verification; (4) After the elderly person leaves, the gate machine will delete the facial photo information in a timely manner.
[0065] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the method of riding in the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0066] This application also provides a vehicle access device, please refer to Figure 5 The vehicle passage device is applied to the gate end, and the device includes: The receiving module 10 is used to receive a ride request from a user; A verification module 20, configured to perform a pass verification on the user based on the ride request through a comprehensive verification model to obtain a verification result, wherein the comprehensive verification model is constructed by a face detection model, a pre-trained age prediction model, and a final age prediction model; The passage module 30 is used to open the gate for the user to pass if the verification result is passed.
[0067] The vehicle access device provided by the present application adopts the vehicle access method in the above embodiment, which can solve the technical problem that the elderly cannot pass quickly and conveniently when riding. Compared with the prior art, the beneficial effects of the vehicle access device provided by the present application are the same as the beneficial effects of the vehicle access method provided by the above embodiment, and the other technical features of the vehicle access device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0068] The present application provides a vehicle-passing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the vehicle-passing method in the above-mentioned embodiment one.
[0069] Reference below Figure 6, which shows a schematic diagram of the structure of a vehicle access device suitable for implementing the embodiment of the present application. The vehicle access device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The illustrated vehicle access equipment is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present application.
[0070] like Figure 6 As shown, the ride access device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 to a random access memory 1004. In the random access memory 1004, various programs and data required for the operation of the ride access device are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. An input / output interface 1006 is also connected to the bus. Generally, the following systems can be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the vehicle access device to communicate with other devices wirelessly or wired to exchange data. Although the figure shows a vehicle access device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0071] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0072] The vehicle access device provided by the present application adopts the vehicle access method in the above embodiment, which can solve the technical problem that the elderly cannot pass quickly and conveniently when riding. Compared with the prior art, the beneficial effects of the vehicle access device provided by the present application are the same as the beneficial effects of the vehicle access method provided by the above embodiment, and the other technical features of the vehicle access device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0073] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0074] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0075] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the vehicle-passing method in the above-mentioned embodiment.
[0076] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0077] The computer-readable storage medium may be included in the vehicle access device; or may exist independently without being incorporated into the vehicle access device.
[0078] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the boarding access device, the boarding access device enables the following: receiving a user's boarding request; based on the boarding request, performing a pass verification on the user through a comprehensive verification model to obtain a verification result, wherein the comprehensive verification model is constructed by a face detection model, a pre-trained age prediction model and a final age prediction model; and when the verification result is a passed verification, opening the gate for the user to pass.
[0079] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0080] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0081] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0082] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned method for passing by a vehicle, and can solve the technical problem that the elderly cannot pass quickly and conveniently when riding a vehicle. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the method for passing by a vehicle provided in the above-mentioned embodiment, and will not be elaborated here.
[0083] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned method for passing by vehicle when executed by a processor.
[0084] The computer program product provided by this application can solve the technical problem that the elderly cannot pass through the vehicle quickly and conveniently. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the vehicle passing method provided by the above embodiment, which will not be repeated here.
[0085] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for traveling by car, characterized in that: The vehicle passing method is applied to the gate end, and the method includes: Receive a ride request from a user; Based on the ride request, the user is verified through a comprehensive verification model to obtain a verification result, wherein the comprehensive verification model is constructed by a face detection model, a pre-trained age prediction model, and a final age prediction model; When the verification result is that the verification is passed, the gate is opened for the user to pass.
2. The method for traveling by car according to claim 1, characterized in that: Before the step of performing a pass verification on the user based on the ride request through a comprehensive verification model to obtain a verification result, the method further includes: Receive a card swiping request from a cardholder; Read the card swiping request to obtain user information of the cardholder, the user information including user age and user gender; The face of the cardholder is collected by the face detection model to obtain a face image of the cardholder; Modifying the initial age prediction model according to the cardholder's facial image to obtain a final age prediction model; The face detection model, the pre-trained age prediction model and the final age prediction model are integrated to obtain a comprehensive verification model.
3. The method for traveling by car according to claim 2, characterized in that: The step of reading the card swiping request to obtain the user information of the card holder includes: Read the card information of the cardholder according to the card swiping request; If age information and gender information are stored in the card information, extract the age information and gender information to obtain user information; If the age information and gender information are not stored in the card information, an information call request is sent to the cloud platform according to the card number of the card information. The cloud platform queries the user information of the cardholder based on the information call request and sends the user information to the gate end.
4. The method for traveling by car according to claim 2, characterized in that: The step of collecting the face of the cardholder through the face detection model to obtain the face image of the cardholder comprises: According to the card swiping request, an image of the card holder is captured by a camera device to obtain an initial image; Performing face detection on the initial image using the face detection model to obtain a detection result; When there is more than one face image in the detection result, selecting the largest face in the detection result as the target face, and performing image extraction based on the target face to obtain an initial face image; The initial facial image is normalized to obtain a facial image of the cardholder.
5. The method for traveling by car according to claim 2, characterized in that: The step of correcting the initial age prediction model according to the cardholder's facial image to obtain a final age prediction model comprises: Performing gender detection on the cardholder's facial image using a gender prediction model to obtain a gender detection result; Performing age detection on the cardholder's facial image using the initial age prediction model to obtain an age detection result; Comparing the age detection result with the user age to obtain a first comparison result; Comparing the gender detection result with the gender of the user to obtain a second comparison result; In the case where the first comparison result and / or the second comparison result fails, the failed first comparison result and / or the second comparison result is sent to a manual confirmation terminal for false detection judgment to obtain a judgment result; The initial age prediction model is modified according to the judgment result to obtain a final age prediction model.
6. The method for traveling by car according to claim 1, characterized in that: The step of performing pass verification on the user based on the ride request through a comprehensive verification model to obtain a verification result comprises: Acquire an initial face image through the face detection model, and preprocess the initial face image to obtain several frames of face images; Inputting the plurality of frames of face images into the final age prediction model to obtain a first user age prediction result; Performing pass verification on the first user age prediction result; If the first user age prediction result meets the applicable age standard, the verification result is obtained as verification passed; If the first user age prediction result does not meet the use age standard, the age prediction is performed on the several frames of face images through the pre-trained age prediction model to obtain a second age prediction result, and when the second age prediction result meets the use age standard, the verification result is obtained as verification passed.
7. A vehicle access device, characterized in that: The vehicle passing device is applied to the gate end, and the device comprises: A receiving module, used for receiving a ride request from a user; A verification module, configured to perform a pass verification on the user based on the ride request through a comprehensive verification model to obtain a verification result, wherein the comprehensive verification model is constructed by a face detection model, a pre-trained age prediction model, and a final age prediction model; The passage module is used to open the gate for the user to pass when the verification result is passed.
8. A vehicle access device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the vehicle-passing method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the vehicle-passing method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the vehicle-traveling method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Bus pos machine based on face recognition
CN113643489A
Control method and device for intelligent face recognition door lock
CN116721486A
Passage verification method and device, equipment and storage medium
CN117475543A
Image processing model training method and device, equipment and medium
CN119314157A