A Lightweight Convolutional Neural Network for Real-Time Recognition of Hand-Drawn Geometric Shapes
Abstract
Recognizing hand-drawn geometric shapes is a foundational sub-problem of sketch recognition, with applications in education, human-computer interaction, and diagram digitization. This paper presents the design, implementation, and evaluation of a desktop application that recognizes four basic hand-drawn geometric shapes, circle, square, rectangle, and triangle using a compact Convolutional Neural Network (CNN). A dataset of 2,000 labeled 28x28-pixel shape images was collected independently and released publicly. The classifier consists of three convolutional blocks (16, 32, and 64 filters) with max-pooling, an in-model data-augmentation stage (random horizontal flip, rotation, and zoom), a dropout-regularized dense layer of 128 units, and a 4-way linear output layer, totaling 97,956 trainable parameters. The network is trained with the Adam optimizer on a sparse categorical cross-entropy objective computed directly on logits. On an 80/20 train-validation split, the model achieves 94.80% training accuracy and 96.01% validation accuracy with a validation loss of 0.1437. A Tkinter-based graphical interface allows a user to draw a shape with the mouse and receive an immediate class prediction with a confidence score. We situate this system within the broader sketch and shape-recognition literature, compare its accuracy against related hand-drawn shape classification studies, and discuss the limitations inherent to a small, single-contributor dataset. The complete source code, trained model, and per-class datasets are released publicly to support reproducibility.
Create a lesson
Metadata
- Categories
- cs.CV, cs.LG
Related papers
LuxAvatar: Real-Time Relightable Head Avatars via Causal Neural Shading of 3D Intrinsic Proxies
Shared title terminologycs.CVYipengjing Sun, Chenyang Wang, Boyao Zhou et al.
PEARL: A Lightweight Prompt-based Feature Interpreter Framework for Real-Time, Anonymous, and Heterogeneous Collaborative Perception
Shared title terminologycs.CVArmin Maleki, Hayder Radha
You Only Look Multiple Times: YoloMT, a Real-Time Streaming Model on a T4
Shared title terminologycs.CVNessim Ben Abbes, Duc Han Le, Sabri Mtibaa et al.
Real-Time Atomic-Resolution Electron Phase Imaging without Probe Calibration via Ptychography-Supervised Learning
Shared title terminologycs.CVH. Yue, C. -C. Chen, C. -N. Hsiao et al.
Lightweight Pedestrian Head-Orientation Recognition Network for Safe Pedestrian-Vehicle Interaction
Shared title terminologycs.CVYuanzhe Li, Yidi Huang, Xiaotong Chang et al.
Vision Transformers versus convolutional neural networks for fine-grained orchid genus identification in a species-rich, data-poor flora: a controlled benchmark on the Orchidaceae of New Guinea
Shared title terminologycs.CVReza Saputra, Diah Harnoni Apriyanti, André Schuiteman et al.