# RGB Color Space-Enhanced Training Data Generation for Cucumber Classification

**Authors:** Hotaka Hoshino, Takuya Shindo, Takefumi Hiraguri, Nobuhiko Itoh

PMC · DOI: 10.3390/jimaging11040120 · 2025-04-17

## TL;DR

This paper introduces a method to improve cucumber classification by embedding key features into the RGB color space of training images, making the system more accurate and accessible.

## Contribution

The novel approach encodes cucumber attributes into the RGB color space to enhance CNN-based classification accuracy.

## Key findings

- The proposed method achieved 79.1% accuracy compared to 70.1% without RGB color space enhancement.
- The system improved multi-class classification metrics like precision, recall, and F-measure.
- The RGB-based method showed 1.1 times better performance than conventional approaches.

## Abstract

Cucumber farmers classify harvested cucumbers based on specific criteria before they are introduced to the market. During peak harvesting periods, farmers must process a large volume of cucumbers; however, the classification task requires specialized knowledge and experience. This expertise-dependent process poses a significant challenge, as it prevents untrained individuals, including hired workers, from effectively assisting in classification, thereby necessitating that farmers perform the task themselves. To address this issue, this study aims to develop a classification system that enables individuals, regardless of their level of expertise, to accurately classify cucumbers. The proposed system employs a convolutional neural network (CNN) to process cucumber images and generate classification results. The CNN used in this study consists of a total of 11 layers: 2 convolution layers, 2 pooling layers, 3 dense layers, and 4 dropout layers. To facilitate the widespread adoption of this system, improving classification accuracy is imperative. In this paper, we propose a method for embedding information related to cucumber length, bend, and thickness into the background space of cucumber images when creating training data. Specifically, this method encodes these attributes into the RGB color space, allowing the background color to vary based on the cucumber’s length, bend, and thickness. The effectiveness of the proposed method is validated through an evaluation of multi-class classification metrics, including accuracy, recall, precision, and F-measure, using cucumbers classified based on the criteria established by an actual agricultural cooperative. The experimental results demonstrate that the proposed method improves these evaluation metrics, thereby enhancing the overall performance of the system.Specifically, the proposed method achieved 79.1% accuracy, while the method without RGB color space achieved 70.1% accuracy. This indicates that the proposed method achieves 1.1 times better performance than the conventional method.

## Full-text entities

- **Species:** Cucumis sativus (cucumber, species) [taxon 3659]

## Figures

13 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12027886/full.md

---
Source: https://tomesphere.com/paper/PMC12027886