Grain buyers reject canola kernels that have been heated or remain immature due to excessive drying or frost exposure, as these defects reduce both oil extraction rates and commercial value. The current grading protocol relies on visually inspecting each seed's endosperm hue and manually tallying the damaged specimens. Given that this method is tedious, labour-intensive, and prone to human error, the present work proposes an automated grading pipeline based on object detection, multi-object tracking, and enumeration. The detection phase was accomplished using a refined YOLOv7 architecture (YOLOv7_ours), which was adapted to bolster its small-object recognition accuracy by embedding two convolutional block attention modules into the neck section, while simultaneously lowering its computational demand (cost) and footprint by swapping conventional convolutional layers for ghost layers across all Efficient Layer Aggregation Networks modules and within the Spatial Pyramid Pooling Cross Stage Partial module native to YOLOv7. The trained network parameters were then passed to the ByteTrack multiple-object tracker, enabling frame-by-frame tracking of detections throughout a video sequence. The distinct identifiers generated by the tracker for each target of interest were subsequently used to tabulate defect counts using a line-crossing procedure. Following training, the YOLOv7_ours model delivered a mean average precision (
[email protected]) that was 1.02% superior, alongside a 32.1% reduction in cost and a 37.1% reduction in size relative to the baseline YOLOv7 model. Assessed on a test video, the full pipeline achieved a multi-object tracking accuracy of 84.8% and a counting accuracy of 93.9%. This three-component framework is ready for integration into edge devices, enabling grain buyers to precisely grade canola kernels in real time.