Application of Artificial Intelligence in Flower Recognition

Pingchuan MaAtlantis 2023 · DOI · OpenAlex

TL;DR

This paper presents an accessible educational framework that combines programmable robots with AI-enhanced Scratch extensions to lower the barrier for learning machine learning. By abstracting complex workflows into "block-style" programming, the authors demonstrate how students can build a functional flower recognition system—distinguishing between peach blossoms and tulips—without needing to master Python or deep mathematical theory first.

What Problem Does This Paper Address?

Artificial Intelligence is often perceived as a "black box" with a prohibitively high entry barrier. For students, the leap from basic logic to AI typically requires a daunting mix of advanced mathematics, complex algorithms, and mastery of specific programming environments like TensorFlow or PyTorch.

The author, Pingchuan Ma, identifies this "syntax and math" hurdle as the primary obstacle in AI education. The paper seeks to bridge this gap by utilizing Scratch, a graphical programming language, and physical hardware to make abstract AI concepts—like data collection, model training, and inference—tangible and interactive.

Methods

The researchers developed a full-stack educational platform consisting of three main components:

  1. The Hardware: A programmable robot built on either a Raspberry Pi or Nvidia Jetson Nano running Ubuntu. It is equipped with a camera for image capture, motors for movement, and a microphone/speaker for audio I/O.
  2. The Software Architecture: The system uses a web-based architecture where a Scratch front-end communicates with a backend service called scratchd via AJAX (GET/POST requests). This allows the robot to perform heavy lifting—like model training and motor driving—while the student interacts with a simple browser interface.
  3. The AI Extensions: The core innovation lies in custom Scratch blocks that represent machine learning functions. For example:
  4. Training Blocks: These allow students to feed an image into the system and assign it a label (e.g., "peach blossom").
  5. Prediction Blocks: These trigger the inference process, where the robot analyzes a new image and returns a classification based on the trained model.

To solve the common "headless" setup headache, the authors also developed a WeChat mini-program that uses Bluetooth to configure the robot’s Wi-Fi and broadcast its IP address via voice.

Datasets

The paper demonstrates the system using a small, specialized dataset for flower recognition:

  • Categories: Peach blossoms and Tulips.
  • Scale: The example describes a training set of 9 "shapes" (images) per category.
  • Input Sources: Images can be hand-drawn within the Scratch interface, uploaded locally, or captured live via the robot’s camera.

Unlike massive benchmarks like ImageNet, this approach focuses on "small data" to help students understand the relationship between specific training inputs and the resulting model accuracy.

Key Insights and Ideas

  • Mapping the ML Lifecycle to Blocks: The most significant contribution is the direct mapping of the machine learning pipeline (Data -> Algorithm -> Model -> Forecast) into a visual UI. This allows students to see the "logic" of AI as a sequence of events rather than a wall of code.
  • The "Robot as Scheduler" Role: The paper introduces a clever multi-role programming architecture. In their flower recognition project, different "roles" (Dataset1, Test Set, and the Robot) communicate via broadcast messages. This teaches students about asynchronous messaging and system orchestration.
  • Hardware Engagement: By moving AI out of the screen and onto a robot that can move and speak its results, the learning process becomes more "sticky" and engaging for younger learners.

Key Results

The authors successfully implemented a functional flower recognition robot.

  • Qualitative Success: The system demonstrated that a browser-based Scratch environment could successfully trigger model training and real-time inference on edge hardware (Raspberry Pi/Jetson Nano).
  • Quantitative Example: In the provided reasoning process (Fig. 2), the system returned confidence scores (e.g., 80% for peach blossom vs. 90% for tulip), illustrating how the robot handles probabilistic results.
  • Educational Utility: The framework provides a clear path for students to progress from "block-style" logic to understanding the general process of AI, including data collection and model evaluation.

Limitations and Future Work

While the platform is an excellent introductory tool, the paper notes several areas for growth:

  • Complexity Ceiling: The current implementation is focused on simple classification. It does not yet delve into more complex tasks like object detection or natural language processing in a deep way.
  • The "Black Box" of Algorithms: While the process is transparent, the underlying mathematical algorithms remain hidden within the scratchd service.
  • Future Directions: The author suggests that once students master the "block" logic, the next step is transitioning to Python to explore data preprocessing, web crawling, and more sophisticated architectures like neural networks and linear regression.

Summary updated

Abstract

This paper introduces a programmable robot with AI-oriented scratch extensions by analyzing its implementation architecture and operating procedure, and those of a corresponding mini-app for wireless configuration.It explains some typical extensions and their key building blocks, such as costume and backdrop and image classification.It also illustrates the fundamental idea and steps for artificial intelligence, especially machine learning, by implementing a robot to recognize two different categories of flowers.
BibTeX
@inproceedings{ma2023application,
  author = {Pingchuan Ma},
  title = {{Application of Artificial Intelligence in Flower Recognition}},
  booktitle = {Atlantis},
  year = {2023},
  doi = {10.2991/978-94-6463-304-7\_21},
}

Loading related content...

Figure