1 Project Introduction
1.1 Demo Video
1.2 Project Design
Do you often forget to drink water because you're too focused on work or study? Insufficient water intake over a long period can harm your health. The "Hydration Butler" uses the Mind+ model training tool to train a model and deploy it to the UNIHIKER M10. If a cup is detected placed on the desktop for an extended period, it prompts the user to drink water promptly; if the cup is not detected for a long time, it reminds the user to return the cup; if the cup is detected at the edge of the detection screen, it prompts the user to move it inward.
Through this project, you will learn about:
• Model Training: How to train an object detection model using the Mind+ 2.0 model training tool.
• Model Deployment: How to deploy the trained model to the UNIHIKER M10 to achieve cup object detection and further monitor and remind drinking status.
• Ethical Discussion: How to think about and address AI ethical issues such as energy consumption, false positives, and missed detections in technical practices.
1.3 Project Implementation Process
This project trains a " Cup Object Detection Model" using the Object Detection module in the Mind+2.0 model training tool and deploys this model to the UNIHIKER M10 to achieve cup object detection, thereby monitoring and reminding the drinking state. The overall project workflow is as follows:

2 AI Knowledge Garden - Object Detection
2.1 Object Detection
Object Detection is a core technology in the field of AI computer vision. Unlike image classification, which only identifies "what it is", object detection can not only recognize the category of an object in an image but also accurately locate its position using bounding boxes. For example, in the image below, the object detection model can simultaneously recognize multiple objects such as "cats" and "dogs" and mark their respective position coordinates and categories.

2.2 Applications of Object Detection
Object detection technology has wide application scenarios across multiple fields:
Security Surveillance: Detect abnormal personnel, abandoned items, or intrusions to enhance security capabilities.
Autonomous Driving: Recognize pedestrians, vehicles, traffic signs, etc., to provide environmental information for driving decisions.
Retail Industry: Detect the quantity and placement of products on shelves to assist inventory management.
Medical Imaging: Locate the position of lesions (e.g., tumors, stones) to assist clinical diagnosis.
Industrial Inspection: Identify product defects or abnormal components on production lines to improve quality control efficiency.
2.3 Data Labeling
Data labeling is a critical step in preparing datasets for machine learning.
In object detection tasks, it specifically refers to the process of labeling specific target objects in images or videos by manually or with auxiliary tools with both category information (what it is) and location information (where it is). The location information is typically represented in the form of bounding boxes. The structured data generated from this process provides the "ground truth" for the model, serving as the foundation for training high-performance object detection models.
3 Cup Object Detection Model Training
3.1 Download Software and Create Training Project
Download and install Mind+ 2.0 or higher from the official website, then double-click to open it once installed.Download address: https://www.mindplus.cc/.

Create a new project, click "Model" in the left navigation bar, and select the "Object Detection" task.

3.2 Data Preparation
• Data Collection
Data can be collected via the "Webcam" or "Upload" from local files.

• Data Annotation
Click "Data Annotation" to open the annotation window.

Step 1: Create Tag
Click "Create Tag" and edit the tag name and color.

Step 2: Draw Bounding Box
During annotation, first click the corresponding Tag name (e.g., "Cup") in the left tag list, then use the left mouse button to draw a rectangular bounding box along the target edge in the image, ensuring the bounding box encloses the target. If there are multiple targets in one image (e.g., both "Cat" and "Dog"), repeat the "Select Label - Draw Bounding Box" steps until all targets are annotated.

3.3 Model Training
•Model Training
Click the "Train Model" button to start model training.
•Training Parameter Settings
Click the "Advanced Settings" button to configure parameters.

•Training Process and Results Observation
During training, click "Learn More" in "Advanced Settings" to view the training log.

3.4 Model Validation
•Testing a Single Image
Select "File", click "Click to Upload File", and select an untrained image for validation.

•Real-time Detection Test
Select "Webcam" to perform real-time object detection.

•Model Optimization and Retraining
When the model validation result is not ideal, we can retrain the model through methods such as data quality optimization and model parameter adjustment.
3.5 Model Export
Click the "Export Model" button to export the model compressed package to your local computer.

4 Cup Object Detection Model Deployment
4.1 Hardware List
UNIHIKER M10 System Version Upgrade Tutorial:
https://www.unihiker.com/wiki/SystemAndConfiguration/UnihikerOS/unihiker_os_burn/
4.2 Programming Environment and Extension Setup
For specific steps, please refer to the Mind+ 2.0 Basic User Guide:
https://mindplus.dfrobot.com/mp2/AITools/Basic_description/model_deployment/model-deployment/#522-programming-environment-and-extension-preparation.
4.3 Model Inference and Application
•Upload Model
Upload the exported ONNX file and YAML configuration file to the target environment or hardware platform.

•Program Writing
Code Analysis:



Complete Code:

•Run and Verify

5 AI Ethics Discussion
Technology itself is neutral, but the designers and users of technology bear responsibility. While enjoying the convenience brought by AI, we need to actively reflect on the ethical issues behind it and explore responsible solutions. Now, let's discuss the core ethical challenges that may be encountered in the Hydration Butler project.
5.1 Energy Consumption Issue
•Problem: Continuously running object detection models significantly increases device energy consumption. Long-term use not only shortens device lifespan but also wastes power resources, conflicting with the eco-friendly concept of a healthy lifestyle.
•Suggestion: Set adjustable detection frequency to balance accuracy and energy consumption; implement intelligent sleep mode that automatically reduces detection frequency when no screen changes are detected for an extended period.
5.2 False Alarms and Missed Detections
•Problem: The system may misclassify objects with similar shapes as cups or miss cup detection in poor lighting, leading to alert mechanism failure or false alarms, which affects user experience and trust.
•Suggestion: Introduce a fault-tolerant mechanism. When a cup is detected or not detected, the system does not immediately reset the timer but continues detection for a few more seconds. The timer resets only if the cup is continuously present or absent.
6 Self-Test
6.1 Extended Exercise
Try training a multi-class detection model in Mind+ (e.g., "cup + mobile phone + laptop") and deploy it on the UNIHIKER M10 to implement monitoring for preventing cups from being placed near electronic devices.
6.2 Learning Evaluation Form

Google Drive: https://drive.google.com/file/d/1spBLjMMZb9DpUIZOhOfgQN0Xv7lmCNDY/view?usp=sharing









