The rapid growth of the cannabis industry necessitates accurate and efficient methods for detecting and classifying cannabis seed varieties, which is crucial for quality control, regulatory compliance, and genetic research. This study presents a deep learning approach to automate the detection and classification of 17 different cannabis seed varieties, addressing the limitations of manual inspection processes. Leveraging a unique dataset of 3319 high-resolution seed images, we employ self-supervised bounding box annotation using the Grounding DINO model. Our research evaluates two prominent object detection models, Faster R-CNN and RetinaNet, with different backbone architectures (ResNet50, ResNet101, and ResNeXt101). Extensive experiments reveal that RetinaNet with a ResNet101 backbone achieves the highest strict mean average precision (mAP) of 0.9458 at IoU 0.5–0.95. At the same time, Faster R-CNN with ResNet50 excels at the relaxed 0.5 IoU threshold (0.9428 mAP) and maintains superior recall. Notably, the ResNeXt101 backbone, despite its complexity, shows slightly lower performance across most metrics than ResNet architectures. In terms of inference speed, the Faster R-CNN with a ResNeXt101 backbone demonstrates the fastest processing at 17.5 frames per second. This comprehensive evaluation, including performance-speed trade-offs and per-class detection analysis, highlights the potential of deep learning for automating cannabis seed analysis. Our findings address challenges in seed purity, consistency, and regulatory adherence within the cannabis agricultural domain, paving the way for improved productivity and quality control in the industry.
This study investigated the possibility of using a laser methane detector (LMD) and optical gas imaging (OGI) to detect and quantify enteric methane () produced by ruminants in vitro. Four single‐flow continuous fermenters were used for rumen culture incubation with four different treatment diets: Control (50:50 forage to concentrate [F:C] ratio), Control + Bromoform (CBR), Low Forage (LF; 20:80), and High Forage (HF; 80:20). After 10 days of incubation, all fermenter contents were transferred and used in a 24 h ANKOM batch culture to measure gas production with LMD and OGI. The authors introduce the Controlled Diet (CD) dataset, a large‐scale collection of 4,885 plume images captured using an FLIR GF77 OGI camera under varying dietary conditions. The performance of six semantic segmentation models (FCN, U‐Net, Vision Transformer, Swin Transformer, DeepLabv3+, and Gasformer) on the CD dataset is compared. Results showed that LMD data for followed a similar pattern to the gas chromatography (GC) instrument results. The in vitro results showed that different diets and F:C ratios had an impact on gas production and rumen fermentation characteristics. Adding bromoform to the control diet fully inhibited emission. The HF diet produced more compared to all treatments () when measured with GC and LMD. CBR produced the lowest values when measured with GC and LMD. The Gasformer architecture achieved the highest performance with mean IoU of 85.1% and mean F‐score of 91.72%. These findings demonstrate that OGI technology combined with advanced semantic segmentation models offers a promising solution for predicting and quantifying emissions in the livestock sector, potentially aiding in the development of mitigation strategies to combat climate change.
Weed management represents a critical challenge in agriculture, significantly impacting crop yields and requiring substantial resources for control. Effective weed monitoring and analysis strategies are crucial for implementing sustainable agricultural practices and site-specific management approaches. We introduce WeedSense, a novel multi-task learning architecture for comprehensive weed analysis that jointly performs semantic segmentation, height estimation, and growth stage classification. We present a unique dataset capturing 16 weed species over an 11-week growth cycle with pixel-level annotations, height measurements, and temporal labels. WeedSense leverages a dual-path encoder incorporating Universal Inverted Bottleneck blocks and a Multi-Task Bifurcated Decoder with transformer-based feature fusion to generate multi-scale features and enable simultaneous prediction across multiple tasks. WeedSense outperforms other state-of-the-art models on our comprehensive evaluation. On our multi-task dataset, WeedSense achieves mIoU of 89.78% for segmentation, 1.67cm MAE for height estimation, and 99.99% accuracy for growth stage classification while maintaining real-time inference at 160 FPS. Our multitask approach achieves 3$\times$ faster inference than sequential single-task execution and uses 32.4% fewer parameters. Please see our project page at weedsense.github.io.
Methane emissions from livestock, particularly cattle, significantly contribute to climate change. Effective methane emission mitigation strategies are crucial as the global population and demand for livestock products increase. We introduce Gasformer, a novel semantic segmentation architecture for detecting low-flow rate methane emissions from livestock, and controlled release experiments using optical gas imaging. We present two unique datasets captured with a FLIR GF77 OGI camera. Gasformer leverages a Mix Vision Transformer encoder and a Light-Ham decoder to generate multi-scale features and refine segmentation maps. Gasformer outperforms other state-of-the-art models on both datasets, demonstrating its effectiveness in detecting and segmenting methane plumes in controlled and real-world scenarios. On the livestock dataset, Gasformer achieves mIoU of 88.56%, surpassing other state-of-the-art models. Materials are available at: github.com/toqitahamid/Gasformer.
Analyzing and detecting cannabis seed variants is crucial for the agriculture industry. It enables precision breeding, allowing cultivators to selectively enhance desirable traits. Accurate identification of seed variants also ensures regulatory compliance, facilitating the cultivation of specific cannabis strains with defined characteristics, ultimately improving agricultural productivity and meeting diverse market demands. This paper presents a study on cannabis seed variant detection by employing a state-of-the-art object detection model Faster R-CNN. This study implemented the model on a locally sourced cannabis seed dataset in Thailand, comprising 17 distinct classes. We evaluate six Faster R-CNN models by comparing performance on various metrics and achieving a mAP score of 94.08\% and an F1 score of 95.66\%. This paper presents the first known application of deep neural network object detection models to the novel task of visually identifying cannabis seed types.