Intelligent water dispenser based on camera recognition container and control method of intelligent water dispenser
By combining a camera and an ultrasonic sensor in a dual detection mechanism, the problem of traditional water dispensers being unable to identify container size and liquid level changes has been solved. This enables accurate identification of transparent containers and a safety redundancy design, improving the user experience and safety of the water dispenser.
Patent Information
- Application Number
- CN202511505638.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2026-01-23
AI Technical Summary
Traditional water dispensers cannot effectively identify container size and changes in liquid level inside transparent containers, resulting in inaccurate water volume control and a poor user experience.
A dual detection mechanism combining a camera and an ultrasonic sensor is employed. The camera identifies the shape and initial volume of the container, while the ultrasonic sensor detects the vertical distance. Combined with machine learning algorithms and temperature compensation technology, this enables accurate identification of transparent containers and real-time monitoring of liquid surface fluctuations.
It improves the ability to identify transparent containers, ensures the accuracy of water dispensing time, with an error response speed of no more than 0.2 seconds, and enhances the user experience and safety.
Smart Images

Figure CN121369925A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of smart home devices, and particularly relates to a smart water dispenser based on camera recognition of a container and a control method of the smart water dispenser. BACKGROUND
[0002] The conventional water dispenser has the following defects: 1. The conventional water dispenser cannot recognize the size of the container, resulting in rough control of the output water quantity, and often causing water overflow due to manual operation errors. 2. The conventional water dispenser has difficulty in recognizing transparent containers, and relies on manual adjustment by the user when receiving water, resulting in poor adaptability of the water dispenser.
[0003] In order to optimize the water receiving scheme, the existing water dispenser uses a camera to recognize the container, but it is still difficult to recognize transparent containers and to recognize the change in the liquid level in the container, resulting in the inability to set the water outlet time.
[0004] Therefore, for those skilled in the art, how to design a smart water dispenser that can effectively recognize the container and the change in the liquid level in the container is a technical problem that needs to be solved at present. SUMMARY
[0005] The present application aims to provide a smart water dispenser based on camera recognition of a container and a control method of the smart water dispenser, which has a double detection mechanism, can improve the recognition ability of transparent containers, and can prevent the judgment error of the water outlet time of the smart water dispenser caused by the fluctuation of the liquid level in the container, and improve the use experience of the smart water dispenser.
[0006] To achieve the above-mentioned purpose, the present application provides a smart water dispenser based on camera recognition of a container, comprising a machine body, an acquisition module, a data processing module, a water outlet module and a main control module, a loading platform is arranged on the machine body, the loading platform is located directly below the water outlet and is used for placing a container;
[0007] The acquisition module comprises a camera and an ultrasonic sensor, the camera and the ultrasonic sensor are both located above the loading platform, the camera can form a detection area around the loading platform; the camera and the ultrasonic sensor are both in communication connection with the main control module; the camera is used for acquiring initial image data of the container in the detection area, and the ultrasonic sensor is used for detecting the first vertical distance from the container;
[0008] The data processing module uses a machine learning algorithm to train the initial image data to obtain the shape feature and the initial volume of the container;
[0009] The master module obtains a preset volume of the container according to the first vertical distance of the container, the initial volume and the shape feature, and the master module controls the water outlet module to perform water outlet according to the preset volume of the container.
[0010] Optionally, the intelligent water dispenser based on camera recognition of containers further comprises a hand processing module, the camera is used to acquire hand image data of a user in the detection area, and the hand processing module processes the hand image data to obtain a distance between the hand and the container.
[0011] Optionally, the acquisition module further comprises a temperature sensor, the temperature sensor is located above the object table, and the temperature sensor is used to detect an air temperature around the container; and the ultrasonic sensor is used to obtain a propagation speed of ultrasonic waves in the ultrasonic sensor according to the air temperature.
[0012] Optionally, the water outlet module comprises a water outlet pipeline and an electronic water outlet valve, the electronic water outlet valve is located on the water outlet pipeline, and an end of the water outlet pipeline forms the water outlet; the electronic water outlet valve is in communication connection with the master module, and the master module is used to control opening and closing of the electronic water outlet valve.
[0013] Optionally, the camera is fixed on the machine body by an adjusting support, and the adjusting support is used to adjust an angle of the camera.
[0014] Optionally, the ultrasonic sensor and the camera are respectively arranged on two sides of the water outlet, and a vertical distance between the ultrasonic sensor and the container is kept at 15 cm to 30 cm.
[0015] Optionally, the data processing module trains the initial image data by a YOLOV12 model and a Grad-CAM visualization technology.
[0016] Optionally, the hand processing module identifies joint positions of the hand by a key point detection model.
[0017] To achieve the above-mentioned purposes, the application further provides a control method of an intelligent water dispenser, which is applied to any intelligent water dispenser based on camera recognition of containers, and the control method of the intelligent water dispenser comprises the following steps:
[0018] S01: acquiring initial image data of a container in a detection area by a camera;
[0019] S02: performing graphic preprocessing on the initial image data of the container;
[0020] S03: training the initial image data after preprocessing by the data processing module to obtain the shape feature and initial volume of the container;
[0021] S04: detecting the first vertical distance from the container by the ultrasonic sensor, and obtaining the corrected volume of the container according to the first vertical distance, the initial volume and the shape feature of the container;
[0022] S05: obtaining the preset volume of the container according to the corrected volume, and calculating the theoretical water outlet time of the intelligent water dispenser according to the preset volume, and the main control module controls the water outlet module to outlet water according to the theoretical water outlet time.
[0023] Optionally, the acquisition module further comprises a temperature sensor, which is arranged above the object table;
[0024] In step S04, the specific steps of detecting the first vertical distance from the container by the ultrasonic sensor include:
[0025] detecting the air temperature around the container by the temperature sensor, and obtaining the propagation speed of ultrasonic waves in the ultrasonic sensor according to the air temperature;
[0026] obtaining the first vertical distance from the ultrasonic sensor to the liquid surface in the container or the bottom of the container according to the propagation speed of ultrasonic waves and the propagation time of ultrasonic waves.
[0027] Optionally, the intelligent water dispenser further comprises a hand processing module;
[0028] Before step S05, step S041 is further included;
[0029] S041: identifying the hand image data by the hand processing module to obtain the actual distance between the hand and the container; when the actual distance is less than a preset distance, the main control module closes the water outlet module and returns to step S01.
[0030] Optionally, the control method of the intelligent water dispenser further comprises:
[0031] S06: detecting the second vertical distance from the liquid surface in the container by the ultrasonic sensor, and the main control module obtains the water filling volume of the container according to the second vertical distance, the initial volume and the shape feature of the container; when the difference between the water filling volume and the preset volume is less than the preset difference, the main control module controls the water outlet module to outlet water again according to the set time.
[0032] The application provides an intelligent water dispenser based on camera recognition of a container and a control method of the intelligent water dispenser. BRIEF DESCRIPTION OF DRAWINGS
[0033] Figure 1 FIG. 1 is a structural schematic diagram of the intelligent water dispenser in a preferred embodiment of the application;
[0034] Figure 2 FIG. 4 is a detection effect diagram of the container in the preferred embodiment of the application;
[0035] Figure 3 FIG. 5 is a flow chart of the control method of the intelligent water dispenser in the preferred embodiment of the application.
[0036] In the drawings, the reference signs are explained as follows:
[0037] The main control module 10, the container 20, the object carrier 1, the water outlet 2, the camera 3, the ultrasonic sensor 4, the water outlet pipeline 5, the electronic water outlet valve 6, and the temperature sensor 7. DETAILED DESCRIPTION
[0038] The application will be further described below in conjunction with the drawings and specific embodiments. The advantages and features of the application will be more apparent according to the following description. It should be noted that the drawings are very simplified and use non-precise proportions, only for the purpose of conveniently and clearly assisting the description of the embodiments of the application.
[0039] It should be understood that, unless specifically described or indicated, the terms "first", "second", "third" and the like in the description are merely used to distinguish different components, elements, steps and the like in the description, and are not intended to indicate a logical relationship or a sequence relationship between the components, elements, steps and the like. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the element defined by the phrase "comprising a" does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0040] The application will be described in detail below with reference to the drawings and preferred embodiments. The embodiments described below and the features in the embodiments can be complementary or combined with each other without conflict.
[0041] With reference to Figure 1 and Figure 2 , a preferred embodiment of the application provides an intelligent water dispenser based on camera recognition of a container, which comprises a machine body (not shown), an acquisition module, a data processing module, a water outlet module, a power module and a main control module 10. The machine body is provided with a loading table 1 located directly below a water outlet 2 and used for placing a container 20 (such as a water cup).
[0042] Further, the acquisition module comprises a camera 3 and an ultrasonic sensor 4, both of which are located above the loading table 1, and the camera 3 can form a detection area around the loading table 1. The camera 3 and the ultrasonic sensor 4 are in communication connection with the main control module 10. The camera 3 is used to obtain initial image data of the container 20 in the detection area, and the ultrasonic sensor 4 is used to detect a first vertical distance H1 from the container 20 (the liquid surface in the container 20 or the bottom of the container 20).
[0043] Further, the data processing module uses a machine learning algorithm to train the initial image data to obtain the shape feature and an initial volume V1 of the container 20. The main control module 10 obtains a preset volume V0 of the container 20 according to the first vertical distance H1, the initial volume V1 and the shape feature of the container 20. The main control module 10 controls the water outlet module to dispense water according to the preset volume V0 of the container 20.
[0044] The application provides an intelligent water dispenser based on camera recognition of a container. The intelligent water dispenser has a double detection mechanism, which can realize visual posture recognition and physical distance sensing of the container 20 through the camera 3 and the ultrasonic sensor 4, so that the intelligent water dispenser has a safe redundant design and ensures that the error response speed of the intelligent water dispenser is not greater than 0.2 seconds. At the same time, the intelligent water dispenser can improve the recognition ability of transparent containers and accurately detect the vertical distance from the container 20 through the setting of the ultrasonic sensor 4, thereby obtaining the preset volume V0 of the container 20 for water injection, effectively preventing the liquid level fluctuation in the container 20 from causing misjudgment of the water dispensing time of the intelligent water dispenser, and improving the use experience of the intelligent water dispenser.
[0045] Specifically, the host module 10 obtains the corrected volume V2 of the container 20 according to the first vertical distance H1 detected by the ultrasonic sensor 4, the initial volume V1 and the shape feature of the container 20. The host module 10 further obtains the preset volume V0 of the container 20 according to the corrected volume V2, and calculates the theoretical water outlet time T1 of the intelligent water dispenser according to the preset volume V0. The host module 10 controls the water outlet module to perform water outlet according to the theoretical water outlet time T1, that is, the water outlet 2 starts to outlet water, and stops to outlet water after the water outlet time reaches the theoretical water outlet time T1.
[0046] More specifically, if the container 20 has an initial water level when placed on the loading platform 1, the ultrasonic sensor 4 detects and obtains the first vertical distance H1 from the liquid surface of the container 20. Since the height difference H0 between the bottom of the container 20 and the ultrasonic sensor 4 can be obtained through the data processing module, the initial water level of the container 20 (H0-H1) can be obtained. The host module 10 can obtain the corrected volume V2 of the container 20 (i.e., the water filling volume of the container 20 at this time) according to the initial water level of the container 20, the initial volume V1 and the shape feature of the container 20. If the container 20 has no initial water level when placed on the loading platform 1, the ultrasonic sensor 4 detects and obtains the first vertical distance H1 from the bottom of the container 20. Since the height difference between the bottom of the container 20 and the ultrasonic sensor 4 can be obtained through the data processing module, the height difference is equal to the first vertical distance H1 at this time.
[0047] As a preferred embodiment, the corrected volume V2 of the container 20 is equal to the product of the preset volume V0 and the preset coefficient k, i.e., V2=k*V1. In order to avoid the water in the container 20 from being too full to scald the user, the preset volume V0 of the container 20 is usually 90% to 95% of the corrected volume V2, but is not limited thereto. The designer can set the preset coefficient k of the preset volume V0 of the container 20 relative to the corrected volume V2 according to the needs. The intelligent water dispenser stops water outlet after the actual water outlet reaches the preset volume V0 of the container 20.
[0048] Preferably, the data processing module trains the preprocessed image data through the YOLOV12 model and the Grad-CAM visualization technology. At this time, the intelligent water dispenser can perform adaptive learning and can automatically record the user's water receiving habits, optimize the volume prediction model of the container 20, and can significantly improve the recognition ability of the special-shaped cup after long-term use.
[0049] Further, the YOLOV12 model trains the image data of the container 20 on the HomebrewedDB dataset through transfer learning, extracts the geometric features (edges and aspect ratios) of the container 20, and predicts the bounding box coordinates of the container 20 from the image data, combined with a three-dimensional reconstruction algorithm to obtain the initial volume V1 and shape features of the container 20. Preferably, the input resolution of the YOLOV12 model is preferably set to 640*480, and the identification of the initial volume V1 of the container 20 can be completed within 0.2s.
[0050] Due to the difficulty of conventional water dispensers in identifying special-shaped containers, the user relies on manual adjustment when receiving water. To solve the above problems, the main control module 10 preferably introduces Grad-CAM (Gradient-weighted Class Activation Mapping) visualization technology to enhance the attention of the data processing module to the key features such as the mouth and handle of the container 20, which can make the data processing module achieve an identification accuracy of 98.7% for special-shaped containers.
[0051] In a preferred embodiment, the YOLOV12 model uses the PyTorch framework and adopts the Adam-W optimizer, wherein the learning rate is 0.001 and the batch size is set to 16. When training image data, it is preferable to include more than 5000 image data of cups 20 of different materials and shapes, and the generalization ability can also be enhanced by randomly rotating (amplitude -15°~ +15°) the camera 3 and adjusting the brightness (amplitude -20°~ +20°).
[0052] The existing water dispensers generally lack real-time safety monitoring mechanisms, and there is no anti-mis-touch mechanism at the water outlet 2, so the water dispenser cannot identify when the water receiving person is close, which poses a safety hazard and makes it difficult to effectively avoid accidental contact and scalding by the operator.
[0053] To solve the above problems, the intelligent water dispenser preferably further includes a hand processing module. The camera 3 is used to acquire hand image data of the user in the detection area. The hand processing module processes the hand image data to obtain the distance between the hand and the container 20. When the actual distance between the container 20 and the hand is less than a first preset distance, the main control module 10 closes the water outlet module.
[0054] In a specific example, when the user's hand enters a range within 10 cm of the water outlet, the main control module 10 can trigger the electronic water valve 6 to close within 0.1 seconds.
[0055] Through the above design, the intelligent water dispenser realizes precise water quantity control and safety protection of the intelligent water dispenser through multi-modal sensor fusion to prevent the user from being scalded by hot water and improve the use experience.
[0056] Preferably, the hand processing module identifies the joint positions of the hand through a key point detection model (Open-Pose). When the minimum distance between the joint positions and the hand is less than a second preset distance, the intelligent water dispenser issues an alarm.
[0057] Further preferably, the hand processing module can adopt a dual-mode recognition method, based on ROI region segmentation of a skin color model, combined with inter-frame difference method to detect moving targets, and also based on the hand key point detection algorithm of OpenPose to identify joint positions such as the user's wrist and fingers, to monitor the human posture in the water receiving area in real time, and can trigger an alarm when the user's joint position enters the dangerous area.
[0058] Since the propagation speed C of the ultrasonic wave will change with the temperature change of the medium (air or water), the formula is C = 331.45 + 0.61T, where T is the ambient temperature in ℃. If the temperature influence is ignored, the ultrasonic sensor 4 will generate errors when acquiring the distance between the ultrasonic sensor 4 and the container 20 due to the speed deviation, thereby leading to inaccurate judgment of the actual water level in the container 20.
[0059] With reference to Figure 1 , the acquisition module further includes a temperature sensor 7 located above the object table 1 and preferably adjacent to the ultrasonic sensor 4. The temperature sensor 7 is used to detect the air temperature around the container 20 to obtain the accurate speed of the ultrasonic wave propagation. The ultrasonic sensor 4 is used to obtain the propagation speed of the ultrasonic wave in the ultrasonic sensor 4 according to the air temperature, and is used to obtain the vertical distance between the ultrasonic sensor 4 and the bottom of the container 20 or the liquid level in the container 20 according to the propagation speed of the ultrasonic wave in the ultrasonic sensor 4 and the propagation time of the ultrasonic wave, thereby obtaining the initial water level in the container 20.
[0060] The intelligent water dispenser can perform multi-modal fusion to solve the problems of transparent container recognition and liquid level fluctuation interference through visual recognition, ultrasonic ranging, and temperature compensation, and can improve the accuracy of the ultrasonic sensor 4 ranging through temperature compensation.
[0061] With reference to Figure 1 , the water outlet module includes a water outlet pipeline 5 and an electronic water valve 6, and the electronic water valve 6 is located on the water outlet pipeline 5. The end of the water outlet pipeline 5 forms a water outlet 2. The electronic water valve 6 is in communication connection with the main control module 10, and the main control module 10 is used to close the electronic water valve 6 according to the preset volume V0 of the container 20 to realize automatic water outlet of the intelligent water dispenser. When the container 20 is full of water or a hand approaches the container 20, the main control module 10 closes the electronic water valve 6.
[0062] In the preferred scheme, the electronic water valve 6 adopts a normally closed design and can be automatically closed in a power-off state to prevent water leakage.
[0063] Preferably, the camera 3 is fixed on the body by an adjusting support (not shown) for angle adjustment of the camera 3. In an example, the adjusting support can support the camera 3 for a pitch angle adjustment of -15°~ +15°, ensuring that the containers 20 of different heights can be completely imaged.
[0064] Referring to Figure 1 shown, in a specific example, the ultrasonic sensor 4 and the camera 3 are arranged on the two sides of the water outlet 2 respectively, and the vertical distance between the ultrasonic sensor 4 and the container 20 is kept at 15 cm~30 cm to avoid interference caused by direct water surface.
[0065] In other specific examples, the ultrasonic sensor 4 and the camera 3 can also be located on the same side of the water outlet 2.
[0066] Referring to Figure 3 shown, a preferred embodiment of the present application further provides a control method of an intelligent water dispenser, which is applied to any of the intelligent water dispensers based on camera recognition of containers, and the control method of the intelligent water dispenser comprises:
[0067] S01: obtaining initial image data of the container 20 in the detection area by the camera 3.
[0068] S02: performing graphic preprocessing on the initial image data of the container 20.
[0069] S03: training the preprocessed initial image data by a data processing module to obtain the shape feature and initial volume of the container 20, and also to obtain the placement position of the container 20 on the object table 1.
[0070] S04: detecting the first vertical distance H1 from the container 20 by the ultrasonic sensor 4, and obtaining the corrected volume V2 of the container 20 according to the first vertical distance H1, the initial volume V1 and the shape feature of the container 20.
[0071] S05: obtaining the preset volume V0 of the container 20 according to the corrected volume V2, and calculating the theoretical water outlet time T1 of the intelligent water dispenser according to the preset volume V0, and the main control module 10 controls the water outlet module to perform water outlet according to the theoretical water outlet time T1.
[0072] Specifically, the main control module 10 opens the electronic water outlet valve 6 after obtaining the preset volume V0 of the container 20, and the water outlet 2 starts to outlet water, and the main control module 10 closes the electronic water outlet valve 6 after the water outlet time reaches the theoretical water outlet time T1, and the water outlet 2 stops to outlet water.
[0073] It should be noted that the theoretical water outlet time T1 of the intelligent water dispenser is obtained according to the preset volume V0 of the container 20 divided by the water outlet speed v of the water outlet 2, that is, T1 = V0 / v. For example, the water outlet speed v of the water outlet 2 of the intelligent water dispenser is fixed at 200 ml / min, and the theoretical water outlet time T1 of the intelligent water dispenser is V0 / v*60, and the theoretical water outlet time T1 (unit: seconds) is obtained.
[0074] It should be noted that the image preprocessing can include color channel conversion, size adjustment (Shape / Size), data enhancement and the like. Among them, the color channel conversion is to convert the image from the original color space to the format suitable for the model, eliminate irrelevant color information interference, and unify the input dimension. Size adjustment is to scale / crop the image to the fixed input size required by the model, to avoid training error or inference deviation caused by inconsistent size. Data enhancement can expand the data set scale through pixel-level transformation, random adjustment of brightness, contrast and saturation, random flipping, rotation or scaling, etc. operations, improve the robustness of the model to noise, transformation, environmental changes, and avoid overfitting.
[0075] Further preferably, in step S04, the specific step of detecting the first vertical distance H1 from the container 20 by the ultrasonic sensor 4 includes:
[0076] The air temperature around the container 20 is detected by the temperature sensor 7, and the propagation speed of the ultrasonic wave in the ultrasonic sensor 4 is obtained according to the air temperature.
[0077] The first vertical distance H1 from the ultrasonic sensor 4 to the liquid surface in the container 20 or the bottom of the container 20 is obtained according to the propagation speed of the ultrasonic wave and the propagation time of the ultrasonic wave. The main control module 10 obtains the corrected volume V2 of the container 20 according to the initial volume V1, the shape feature and the first vertical distance H1 of the container 20.
[0078] Preferably, step S05 further includes step S041 before it;
[0079] S041: The hand image data is recognized by the hand processing module to obtain the actual distance between the hand and the container 20. When the actual distance between the hand and the container 20 is less than the preset distance, the main control module 10 closes the water outlet module, and returns to step S01.
[0080] Preferably, the control method of the intelligent water dispenser further comprises:
[0081] S06: detecting the second vertical distance H2 between the ultrasonic sensor 4 and the liquid surface in the container 20, and obtaining the water injection volume V3 of the container 20 according to the second vertical distance H2 of the container 20, the initial volume V1 and the shape characteristics of the container 20. When the difference between the water injection volume V3 and the preset volume V0 is less than the preset difference V4, i.e., V3-V0V4, the main control module 10 controls the water outlet module to outlet water again according to the set time. In this way, the water injection compensation can be realized through the real-time monitoring of the ultrasonic sensor 4.
[0082] In more detail, the second vertical distance H2 between the ultrasonic sensor 4 and the liquid surface in the container 20 is detected and obtained, and the height difference H0 between the bottom of the container 20 and the ultrasonic sensor 4 is obtained through the data processing module, so that the water injection level (H0-H2) of the container 20 is obtained, and the main control module 10 can obtain the water injection volume V3 (i.e., the water injection volume of the container 20) of the container 20 according to the water injection level of the container 20, the initial volume V1 of the container 20 and the shape characteristics of the container 20. In a specific example, after the container 20 is filled with water, the second vertical distance H2 between the ultrasonic sensor 4 and the liquid surface in the container 20 is measured by using the ultrasonic sensor 4, and then the water injection volume V3 of the container 20 is obtained. If the error between the water injection volume V3 of the container 20 and the preset volume V0 exceeds 3%, the secondary water compensation is automatically started.
[0083] In another example, when the ultrasonic sensor 4 detects that the water injection volume V3 of the container 20 is less than 95% of the initial volume V1, the main control module 10 controls the water outlet module to add 0.5 seconds of water to the container 20.
[0084] The main control module 10 is not particularly limited in the present application, and can be hardware for performing logical operations, such as a single-chip microcomputer, a microprocessor, a programmable logic controller (PLC) or a field-programmable gate array (FPGA), or a software program, a functional module, a function, an object library or a dynamic-link library for realizing the above functions on the basis of hardware. It should be known how to specifically realize the communication between the main control module 10 and other devices.
[0085] In summary, the application provides an intelligent water dispenser based on camera recognition of the container. The intelligent water dispenser has a double detection mechanism, which can realize visual posture recognition and physical distance sensing of the container 20 through the camera 3 and the ultrasonic sensor 4, so that the intelligent water dispenser has a safe redundant design, and the error response speed of the intelligent water dispenser is not greater than 0.2 seconds. At the same time, the intelligent water dispenser can improve the recognition ability of the transparent container, and can accurately detect the vertical distance from the container 20 through the setting of the ultrasonic sensor 4, and then obtain the preset volume V0 of the container 20 for water injection, prevent the liquid level fluctuation in the container 20 from causing misjudgment of the water outlet time of the intelligent water dispenser, and improve the use experience of the intelligent water dispenser.
[0086] The above description is only a description of the preferred embodiments of the application, and does not limit the scope of the application. Any modification or change made by a person skilled in the art according to the above disclosure is within the protection scope of the application.
Claims
1. An intelligent water dispenser based on camera recognition of containers, characterized in that, The machine body, the acquisition module, the data processing module, the water outlet module and the main control module are included, a loading platform is arranged on the machine body, the loading platform is located directly below the water outlet and is used for placing a container; The acquisition module includes a camera and an ultrasonic sensor, the camera and the ultrasonic sensor are both located above the loading platform, the camera can form a detection area around the loading platform, the camera and the ultrasonic sensor are both in communication connection with the main control module, the camera is used for acquiring initial image data of the container in the detection area, and the ultrasonic sensor is used for detecting a first vertical distance from the container; The data processing module uses a machine learning algorithm to train the initial image data to obtain shape features and an initial volume of the container; The main control module obtains a preset volume of the container according to the first vertical distance, the initial volume and the shape features of the container, and controls the water outlet module to perform water outlet according to the preset volume of the container.
2. The camera-based recognition container-based intelligent water dispenser of claim 1, wherein, A hand processing module is further included, the camera is used for acquiring hand image data of a user in the detection area, and the hand processing module processes the hand image data to obtain a distance between the hand and the container.
3. The camera recognition based intelligent water dispenser of claim 1, wherein, The acquisition module further includes a temperature sensor, the temperature sensor is located above the loading platform, and the temperature sensor is used for detecting an air temperature around the container; and the ultrasonic sensor is used for obtaining a propagation speed of ultrasonic waves in the ultrasonic sensor according to the air temperature.
4. The camera-based recognition container-based intelligent water dispenser of claim 1, wherein, The water outlet module includes a water outlet pipeline and an electronic water outlet valve, the electronic water outlet valve is located on the water outlet pipeline, and an end portion of the water outlet pipeline forms the water outlet; the electronic water outlet valve is in communication connection with the main control module, and the main control module is used for controlling opening and closing of the electronic water outlet valve.
5. The camera-based recognition container-based intelligent water dispenser of claim 1, wherein, The camera is fixed on the machine body by using an adjusting support, and the adjusting support is used for angle adjustment of the camera.
6. The camera-based recognition container-based intelligent water dispenser of claim 1, wherein, The ultrasonic sensor and the camera are respectively arranged on two sides of the water outlet, and a vertical distance between the ultrasonic sensor and the container is kept at 15 cm to 30 cm.
7. The control method of the smart water dispenser according to any one of claims 1 to 6, characterized in that, The data processing module trains the initial image data by using a YOLOV12 model and a Grad-CAM visualization technology.
8. The control method of the smart water dispenser according to claim 2, characterized in that, The hand processing module identifies joint positions of the hand by using a key point detection model.
9. A control method of an intelligent water dispenser, characterized by, The control method is applied to the intelligent water dispenser based on camera recognition of a container as claimed in any one of claims 1 to 8, and the control method of the intelligent water dispenser includes the following steps: S01: acquiring initial image data of a container in a detection area by using a camera; S02: performing image preprocessing on the initial image data of the container; S03: training the initial image data after preprocessing by using a data processing module to obtain shape features and an initial volume of the container; S04: detecting a first vertical distance from the container by using an ultrasonic sensor, and obtaining a corrected volume of the container according to the first vertical distance, the initial volume and the shape features of the container; and S05: obtaining a preset volume of the container according to the corrected volume, and calculating a theoretical water outlet time of the intelligent water dispenser according to the preset volume, and the main control module controls the water outlet module to perform water outlet according to the theoretical water outlet time.
10. The control method of the smart water dispenser according to claim 9, characterized in that, The collection module further comprises a temperature sensor arranged above the object table; In step S04, the specific steps of detecting the first vertical distance from the container by the ultrasonic sensor include: detecting the air temperature around the container by the temperature sensor, and obtaining the propagation speed of the ultrasonic wave in the ultrasonic sensor according to the air temperature; obtaining the first vertical distance from the container bottom or the liquid level in the container according to the propagation speed of the ultrasonic wave and the propagation time of the ultrasonic wave.
11. The control method of the smart water dispenser according to claim 10, characterized in that, The intelligent water dispenser further comprises a hand processing module; Before step S05, step S041 is further included; S041: identifying the hand image data by the hand processing module to obtain the actual distance between the hand and the container; when the actual distance is less than a preset distance, the main control module closes the water outlet module and returns to step S01.
12. The control method of the smart water dispenser according to claim 10, characterized in that, The control method of the intelligent water dispenser further comprises: S06: detecting a second vertical distance from the liquid level in the container by the ultrasonic sensor, and obtaining a water filling volume of the container according to the second vertical distance, the initial volume and the shape feature of the container by the main control module; when the difference between the water filling volume and the preset volume is less than the preset difference, the main control module controls the water outlet module to perform water outlet again according to a set time.