# A Fast and Real‐Time Machine Vision Evaluation System for Size Grading of Agaricus bisporus Based on Video

**Authors:** Qiyang Shui, Fajun Miao, Senping Liu, Liang Cao, Huanyu Jiang, Jinzhu Lu

PMC · DOI: 10.1002/fsn3.71328 · Food Science & Nutrition · 2026-01-08

## TL;DR

This paper presents a fast, real-time machine vision system for grading the size of Agaricus bisporus mushrooms using video, improving efficiency and accuracy over manual methods.

## Contribution

A lightweight YOLOv5 model optimized for edge devices with high grading speed and accuracy for moving mushrooms in low-resolution and low-light conditions.

## Key findings

- The improved model reduced size by 86.1% and increased FPS by 9.8% while maintaining 97.1% mAP.
- The system grades 1066.67 mushrooms per minute with 97.87% accuracy at a transport speed of 130.17 mm/s.
- The system shows strong adaptability and stability in low-resolution and low-light conditions.

## Abstract

Automatic grading in factory production is a key component for improving production efficiency and ensuring product quality. As one of the most widely consumed edible mushrooms in the world, the cap diameter of Agaricus bisporus is a key factor affecting the market selling price. In addition to the high labor cost, manual grading is subjective and prone to human assessment errors. Therefore, this study proposes a video‐based fast real‐time machine vision evaluation system for size grading of Agaricus bisporus mushrooms. The designed grading system consists of a conveyor belt to achieve transportation of Agaricus bisporus and an overhead color camera to perform size quality assessment. Considering deployment on edge devices, we have optimized the YOLOv5 model for lightweight performance by adopting ShuffleNetV2 as the backbone network, significantly improving the model's lightweight performance and processing speed. At the same time, we investigated the balance between transport speed and recognition accuracy to ensure that the system maintains a high recognition rate while producing efficiently. The results show that the size of the improved model is reduced by 86.1%, FPS is increased by 9.8%, and mAP is 97.1%. The experimental field results show that the grading can still be performed at a high speed with a transmission speed of 130.17 mm/s. The grading speed can reach 1066.67 mushrooms/min with an accuracy of 97.87%, and it also has strong adaptability and stability in low resolution and low light conditions. The video‐based model can detect Agaricus bisporus mushrooms that are always in motion, which is more suitable for practical detection than a single image‐based detection model.

In this study, to address the problem of high cost and strong subjectivity of artificial grading of Agaricus bisporus, we propose a fast real‐time video‐based machine vision grading system, which achieves high‐speed grading of 1066.67 mushrooms per minute with an accuracy of 97.87% by lightweighting the YOLOv5 model and optimizing the balance between the transmission speed and the recognition precision, and exhibits strong adaptability in low‐resolution and low‐light conditions and stability.

## Linked entities

- **Species:** Agaricus bisporus (taxon 5341)

## Full-text entities

- **Species:** Agaricus bisporus (common mushroom, species) [taxon 5341], Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12783697/full.md

## Figures

15 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12783697/full.md

## References

46 references — full list in the complete paper: https://tomesphere.com/paper/PMC12783697/full.md

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