Agri-CV Research

Agricultural Computer Vision Automated Research Framework

From literature discovery to experiment design, evaluation, visualization, and paper drafting — all in one research workflow.

English | 中文


Vision

Agri-CV Research is an AI-powered research framework built for the agricultural computer vision community. It aims to turn a research idea into a structured scientific workflow: discover relevant literature, generate hypotheses, design experiments, train models, evaluate robustness, create publication-ready figures, and draft a paper.

It is designed for researchers, students, engineers, and labs who want a reproducible and extensible foundation for agriculture-focused CV research.


Architecture


Why Agri-CV Research?

  • Domain-first design for agricultural computer vision tasks.
  • End-to-end pipeline spanning idea → experiment → paper.
  • Unified model and dataset interfaces for fast iteration.
  • Robustness and edge evaluation tailored to real agricultural deployment.
  • Publication-oriented outputs including figures, tables, and structured artifacts.
  • Extensible codebase for custom datasets, models, templates, and agent skills.
  • Agent-native workflow that works especially well with Cursor and Claude Code for AI-assisted research engineering.

Core Features

1. Research Pipeline

A modular 9-stage research pipeline:

  1. Literature Search
  2. Ideation
  3. Experiment Design
  4. Data Preparation
  5. Model Training
  6. Evaluation
  7. Visualization
  8. Paper Writing
  9. Review

2. Agricultural CV Focus

Built around real agricultural computer vision scenarios such as:

  • Plant disease classification and detection
  • Weed recognition
  • Fruit counting
  • Crop monitoring
  • Segmentation and few-shot learning

3. Unified Evaluation Stack

Includes:

  • Accuracy / Precision / Recall / F1
  • mAP / IoU / mIoU
  • FPS / FLOPs
  • Robustness under lighting, weather, noise, and occlusion
  • Edge-device benchmarking

4. Publication-Ready Outputs

Generate assets commonly needed in research papers:

  • Confusion matrices
  • Grad-CAM visualizations
  • Detection visualizations
  • Training curves
  • Ablation tables
  • LaTeX-ready paper artifacts

Use Cases

Agri-CV Research is suitable for a wide range of agriculture-focused computer vision projects, including:

  • Crop disease diagnosis using classification and detection models
  • Field weed identification under real-world environmental conditions
  • Fruit counting and yield estimation for orchards and greenhouse systems
  • Plant phenotyping and growth monitoring with visual analysis pipelines
  • Robustness benchmarking for deployment in rain, fog, occlusion, and low-light environments
  • Paper prototyping for students, researchers, and AI-for-agriculture labs

AI Coding Workflow

This project can be developed and extended efficiently with modern AI coding environments, especially:

  • Cursor — for repo-aware coding, iterative refactoring, code navigation, and long-context engineering workflows
  • Claude Code — for CLI-first development, code generation, structured editing, and research-oriented automation workflows

Recommended usage:

  • Use Cursor for interactive repository exploration, architectural editing, and documentation polishing
  • Use Claude Code for command-driven development, scripting, pipeline assembly, and rapid implementation iterations
  • Combine both to accelerate agricultural CV research prototyping from idea to reproducible artifact

Quick Start

Installation

git clone https://github.com/jeffisgod/agri-cv-research.git
cd agri-cv-research
pip install -e .

For development:

pip install -e ".[dev]"

Run the Full Pipeline

agri-research run \
  --topic "lightweight YOLOv8 for tomato leaf disease real-time detection" \
  --template computers_electronics_agri \
  --auto-approve

Run Individual Commands

# Literature search
agri-research search --topic "plant disease detection ViT domain adaptation" \
  --sources arxiv --max-papers 30

# Model training
agri-research train --config config/default_config.yaml \
  --dataset plantvillage --model vit --epochs 50

# Evaluation
agri-research eval --model best.pt --dataset plantdoc \
  --robustness --edge-benchmark

# Paper writing
agri-research paper --results ./outputs \
  --literature ./outputs/stage_01_literature/literature_review.json \
  --template computers_electronics_agri --compile

Project Highlights

Area What it provides
Datasets PlantVillage, PlantDoc, DeepWeeds, MinneApple, and custom dataset interfaces
Models YOLOv8, ViT, EfficientNet, ResNet, SAM, CLIP wrappers
Evaluation Classification, detection, segmentation, robustness, and edge metrics
Visualization Grad-CAM, confusion matrix, radar charts, training curves, figures
Pipeline 9-stage automated scientific workflow
Documentation Tutorials, case studies, templates, and implementation guide

Repository Structure

agri-cv-research/
├── agri_cv_research/     # Main Python package
├── config/               # YAML configuration files
├── docs/                 # Tutorials and case studies
├── skills/               # Agent skills
├── templates/            # LaTeX templates
├── tests/                # Test suite
├── README.md
├── LICENSE
└── CONTRIBUTING.md

Supported Datasets

Dataset Task Classes Images Environment
PlantVillage Classification 38 54,305 Laboratory
PlantDoc Classification / Detection 27 2,598 Real field
DeepWeeds Classification 9 17,509 Field
MinneApple Detection / Counting 1 1,000+ Orchard

Supported Models

Model Library Tasks
YOLOv8 (n/s/m/l/x) ultralytics Detection, Classification, Segmentation
ViT-B/16, ViT-L/14 timm Classification
EfficientNet (B0-B7) timm Classification
ResNet (18/50/101) torchvision Classification
SAM (ViT-H/B/L) segment-anything Segmentation
CLIP (ViT-B/16, ViT-L/14) open-clip-torch Few-shot, Zero-shot

Documentation


Roadmap

Near-term

  • Improve end-to-end pipeline stability
  • Expand dataset adapters and metadata normalization
  • Add more reproducible experiment presets
  • Strengthen robustness benchmarking utilities
  • Polish LaTeX paper generation outputs

Mid-term

  • Add more agricultural foundation models
  • Support multi-modal agronomy workflows
  • Improve citation verification and research traceability
  • Add more edge deployment benchmarks

Long-term

  • Collaborative multi-agent research workflows
  • Automated ablation planning and prioritization
  • Research memory and experiment knowledge base
  • Tighter integration with academic writing and review loops

Development Status

This project is currently in Phase 7 — Testing and Finalization.

  • Phase 1: Skeleton & CLI
  • Phase 2: Dataset Loaders
  • Phase 3: Model Wrappers
  • Phase 4: Evaluation & Visualization
  • Phase 5: Pipeline Integration
  • Phase 6: Templates & Documentation
  • Phase 7: End-to-End Testing

Citation

If you use this project in research, reports, or prototypes, you can cite it as:

@software{jeffisgod_agri_cv_research,
  author = {jeffisgod},
  title = {Agri-CV Research: Agricultural Computer Vision Automated Research Framework},
  year = {2026},
  url = {https://github.com/jeffisgod/agri-cv-research}
}

中文说明

English | 中文

项目简介

Agri-CV Research 是一个面向农业计算机视觉自动化科研的开源框架,目标是把“研究想法”组织成一条清晰、可复用、可扩展的科研工作流:从文献检索、研究假设生成、实验设计、模型训练,到评估分析、可视化生成,以及论文草稿撰写。

它适合农业 CV 方向的研究者、学生、工程师和实验室团队,用于快速搭建规范化、可复现的科研流程。


架构图


为什么选择 Agri-CV Research?

  • 面向农业 CV 场景设计,而不是通用 CV 模板简单拼接。
  • 9 阶段科研管线,覆盖 idea 到 paper 的完整流程。
  • 统一的数据集与模型接口,便于快速试验和替换。
  • 鲁棒性与边缘部署评估,更贴近农业真实落地场景。
  • 面向论文产出,支持图表、消融、LaTeX 论文材料生成。
  • 高扩展性,支持自定义数据集、模型、模板和 skill。
  • AI 原生开发工作流友好,可结合 CursorClaude Code 高效完成科研代码构建与迭代。

核心能力

1. 自动化科研管线

项目包含 9 个主要阶段:

  1. 文献检索
  2. 研究构思
  3. 实验设计
  4. 数据准备
  5. 模型训练
  6. 评估分析
  7. 结果可视化
  8. 论文写作
  9. 自动审阅与修订

2. 聚焦农业计算机视觉

支持的典型研究任务包括:

  • 植物病害分类与检测
  • 杂草识别
  • 果实计数
  • 作物生长监测
  • 分割任务与少样本学习

3. 完整评估体系

内置支持:

  • Accuracy / Precision / Recall / F1
  • mAP / IoU / mIoU
  • FPS / FLOPs
  • 光照、天气、噪声、遮挡等鲁棒性评估
  • 边缘设备推理基准

4. 面向论文输出

可自动生成常见科研产物:

  • 混淆矩阵
  • Grad-CAM 热力图
  • 检测可视化结果
  • 训练曲线
  • 消融实验表格
  • 可直接用于论文的 LaTeX 材料

典型使用场景

  • 作物病害识别研究:用于分类、检测和跨域实验
  • 田间杂草识别:适合复杂环境下的农业视觉任务
  • 果实计数与产量估计:支持果园与温室场景
  • 作物表型与生长监测:适合长期观察和阶段分析
  • 鲁棒性评测:验证模型在雾、雨、遮挡、低照度下的表现
  • 论文原型系统:适合实验室、学生项目和科研原型验证

AI 开发工作流

本项目也非常适合结合现代 AI 编程环境进行开发与扩展,尤其包括:

  • Cursor:适合仓库级代码理解、交互式重构、长上下文工程开发与文档整理
  • Claude Code:适合命令行驱动开发、脚本生成、结构化修改,以及偏科研流程的自动化实现

推荐组合方式:

  • Cursor 做仓库浏览、结构调整、README 与文档优化
  • Claude Code 做命令式开发、脚本拼装、流程搭建与快速迭代
  • 两者结合,可显著提升农业计算机视觉科研原型从想法到可复现实验产物的速度

快速开始

安装

git clone https://github.com/jeffisgod/agri-cv-research.git
cd agri-cv-research
pip install -e .

开发环境安装:

pip install -e ".[dev]"

一键运行完整流程

agri-research run \
  --topic "lightweight YOLOv8 for tomato leaf disease real-time detection" \
  --template computers_electronics_agri \
  --auto-approve

文档入口


路线图

近期计划

  • 提升端到端管线稳定性
  • 扩展数据集适配器与元数据标准化能力
  • 增加更多可复现的实验配置模板
  • 强化鲁棒性评测工具链
  • 优化 LaTeX 论文输出质量

中期计划

  • 接入更多农业基础模型
  • 支持更多多模态农业科研流程
  • 强化引用验证与研究过程可追踪性
  • 增加更多边缘部署评测能力

长期计划

  • 支持多智能体协作式科研工作流
  • 自动规划和筛选消融实验
  • 建立研究记忆与实验知识库
  • 更紧密地连接写作、评审与修订闭环

当前进度

当前项目处��� Phase 7 — 测试与收尾

  • Phase 1:骨架与 CLI
  • Phase 2:数据集加载器
  • Phase 3:模型封装
  • Phase 4:评估与可视化
  • Phase 5:管线集成
  • Phase 6:模板与文档
  • Phase 7:端到端测试

引用方式

如果你在研究、报告或原型系统中使用本项目,可参考以下格式引用:

@software{jeffisgod_agri_cv_research,
  author = {jeffisgod},
  title = {Agri-CV Research: Agricultural Computer Vision Automated Research Framework},
  year = {2026},
  url = {https://github.com/jeffisgod/agri-cv-research}
}

贡献与许可

欢迎贡献代码与建议,提交前请阅读 CONTRIBUTING.md

本项目采用 MIT License 开源许可。