File size: 2,344 Bytes
f8eb07d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
"""
CropDoctor-Semantic: AI-Powered Plant Disease Diagnosis
========================================================

A comprehensive pipeline for plant disease diagnosis using:
- SAM 3 (Segment Anything Model 3) for concept-based segmentation
- CNN-based severity classification
- LLM-powered treatment recommendations

Main Components:
    - SAM3Segmenter: Zero-shot disease region segmentation
    - SeverityClassifier: CNN for severity assessment
    - TreatmentRecommender: Claude API integration for treatment advice
    - CropDoctorPipeline: End-to-end diagnostic pipeline

Quick Start:
    >>> from src.pipeline import CropDoctorPipeline
    >>> pipeline = CropDoctorPipeline()
    >>> result = pipeline.diagnose("path/to/leaf.jpg")
    >>> print(result.disease_name, result.severity_label)

For more information, see the README.md or documentation.
"""

__version__ = "0.1.0"
__author__ = "CropDoctor Team"

from .sam3_segmentation import (
    SAM3Segmenter,
    MockSAM3Segmenter,
    create_segmenter,
    SegmentationResult
)

from .severity_classifier import (
    SeverityClassifier,
    SeverityClassifierCNN,
    SeverityPrediction,
    SEVERITY_LABELS,
    SEVERITY_DESCRIPTIONS
)

from .treatment_recommender import (
    TreatmentRecommender,
    TreatmentRecommendation,
    DISEASE_DATABASE
)

from .pipeline import (
    CropDoctorPipeline,
    DiagnosticResult,
    quick_diagnose
)

from .visualization import (
    create_diagnostic_visualization,
    create_mask_overlay,
    create_severity_heatmap,
    create_comparison_view,
    create_treatment_card,
    save_visualization
)

__all__ = [
    # Version
    '__version__',
    
    # Segmentation
    'SAM3Segmenter',
    'MockSAM3Segmenter',
    'create_segmenter',
    'SegmentationResult',
    
    # Classification
    'SeverityClassifier',
    'SeverityClassifierCNN',
    'SeverityPrediction',
    'SEVERITY_LABELS',
    'SEVERITY_DESCRIPTIONS',
    
    # Recommendations
    'TreatmentRecommender',
    'TreatmentRecommendation',
    'DISEASE_DATABASE',
    
    # Pipeline
    'CropDoctorPipeline',
    'DiagnosticResult',
    'quick_diagnose',
    
    # Visualization
    'create_diagnostic_visualization',
    'create_mask_overlay',
    'create_severity_heatmap',
    'create_comparison_view',
    'create_treatment_card',
    'save_visualization',
]