ritesh313 commited on
Commit
3efe2a2
·
verified ·
1 Parent(s): 3bd3fcf

Upload ResNet-18 species model (epoch 4)

Browse files
Files changed (4) hide show
  1. README.md +76 -0
  2. classification_report.csv +152 -0
  3. config.json +178 -0
  4. model.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ library_name: deepforest
4
+ pipeline_tag: image-classification
5
+ tags:
6
+ - deepforest
7
+ - crop-model
8
+ - tree-species
9
+ - ecology
10
+ - neon
11
+ ---
12
+
13
+ # Tree Species Classification (CropModel)
14
+
15
+ Classifies tree crowns detected by [DeepForest](https://github.com/weecology/DeepForest) into 148 species using USDA PLANTS codes. Trained on RGB imagery from 29 [NEON](https://www.neonscience.org/) sites across North America.
16
+
17
+ Trained with [NeonTreeClassification](https://github.com/GatorSense/NeonTreeClassification).
18
+
19
+ ## Usage
20
+
21
+ ```python
22
+ from deepforest import main
23
+ from deepforest.model import CropModel
24
+
25
+ detector = main.deepforest()
26
+ detector.load_model("weecology/deepforest-tree")
27
+
28
+ species_model = CropModel.load_model("weecology/cropmodel-tree-species")
29
+
30
+ results = detector.predict_tile(path="tile.tif", crop_model=species_model)
31
+ # results has columns: cropmodel_label, cropmodel_score
32
+ ```
33
+
34
+ ## Results (Test Set)
35
+
36
+ | Metric | Value |
37
+ |---|---|
38
+ | Accuracy | 39.3% |
39
+ | Macro F1 | 0.23 |
40
+ | Weighted F1 | 0.39 |
41
+ | Classes | 148 |
42
+
43
+ Full per-class precision/recall/F1 in [`classification_report.csv`](classification_report.csv).
44
+
45
+ ## Training
46
+
47
+ | Parameter | Value |
48
+ |---|---|
49
+ | Architecture | ResNet-18 (torchvision, ImageNet pretrained) |
50
+ | Input | 224x224 RGB, ImageNet normalization |
51
+ | Resize interpolation | nearest-neighbor |
52
+ | Optimizer | AdamW (lr=2.5e-4, weight_decay=1e-4) |
53
+ | Scheduler | ReduceLROnPlateau |
54
+ | Max epochs | 500 (early stopping patience=15) |
55
+ | Best epoch | 4 (val_loss=2.65) |
56
+ | Batch size | 256 |
57
+ | Class weights | sqrt inverse-frequency |
58
+ | Seed | 42 |
59
+
60
+ ## Dataset
61
+
62
+ 16,348 deduplicated tree crowns from 29 NEON sites. One sample per unique individual, rare species (<6 samples) removed. Labels from NEON Vegetation Structure Taxonomy (VST) field surveys. RGB crown crops extracted at 0.1m resolution.
63
+
64
+ | Split | Samples |
65
+ |---|---|
66
+ | Train (70%) | 11,443 |
67
+ | Val (15%) | 2,452 |
68
+ | Test (15%) | 2,453 |
69
+
70
+ Split method: stratified random, seed=42.
71
+
72
+ **Sites**: ABBY, BART, BONA, CLBJ, DEJU, DELA, GRSM, GUAN, HARV, HEAL, JERC, KONZ, LENO, MLBS, MOAB, NIWO, ONAQ, OSBS, PUUM, RMNP, SCBI, SERC, SJER, SOAP, TALL, TEAK, UKFS, UNDE, WREF
73
+
74
+ ## License
75
+
76
+ MIT
classification_report.csv ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ,precision,recall,f1-score,support
2
+ 2PLANT (0),0.0,0.0,0.0,12.0
3
+ 2PLANT-S (1),0.0,0.0,0.0,1.0
4
+ ABAM (2),0.3529,0.2222,0.2727,27.0
5
+ ABBA (3),0.1935,0.4615,0.2727,13.0
6
+ ABCO (4),0.0,0.0,0.0,2.0
7
+ ABFR (5),1.0,1.0,1.0,1.0
8
+ ABIES (6),0.0,0.0,0.0,1.0
9
+ ABLAL (7),0.475,0.4419,0.4578,43.0
10
+ ABLO (8),0.4667,0.5,0.4828,14.0
11
+ ABMA (9),0.5556,0.4167,0.4762,12.0
12
+ ACBA3 (10),0.0,0.0,0.0,1.0
13
+ ACCI (11),0.0,0.0,0.0,1.0
14
+ ACNE2 (12),0.1875,0.4615,0.2667,13.0
15
+ ACNEN (13),0.0,0.0,0.0,2.0
16
+ ACPE (14),0.25,0.1667,0.2,6.0
17
+ ACRU (15),0.3105,0.2646,0.2857,223.0
18
+ ACRUR (16),0.0,0.0,0.0,1.0
19
+ ACSA2 (17),0.0,0.0,0.0,2.0
20
+ ACSA3 (18),0.5263,0.5,0.5128,20.0
21
+ ACSAS (19),0.1667,0.2222,0.1905,9.0
22
+ ALRU2 (20),0.0909,0.25,0.1333,4.0
23
+ AMLA (21),0.0588,0.0526,0.0556,19.0
24
+ ARVIM (22),0.0,0.0,0.0,1.0
25
+ BEAL2 (23),0.25,0.1304,0.1714,23.0
26
+ BELE (24),0.1176,0.2105,0.1509,19.0
27
+ BENE4 (25),0.8333,0.75,0.7895,40.0
28
+ BEPA (26),0.0,0.0,0.0,3.0
29
+ BEPAP (27),0.15,0.2308,0.1818,13.0
30
+ BEPO (28),0.0,0.0,0.0,1.0
31
+ BOSU2 (29),1.0,0.3333,0.5,3.0
32
+ BUBU (30),1.0,0.5,0.6667,2.0
33
+ BUSI (31),0.4,1.0,0.5714,2.0
34
+ CAAQ2 (32),0.0,0.0,0.0,1.0
35
+ CACA18 (33),0.15,0.1,0.12,30.0
36
+ CADE27 (34),0.6667,0.1905,0.2963,21.0
37
+ CAGL8 (35),0.0,0.0,0.0,6.0
38
+ CAIL2 (36),0.0,0.0,0.0,2.0
39
+ CAOV2 (37),1.0,0.0833,0.1538,12.0
40
+ CATO6 (38),0.1,0.0909,0.0952,22.0
41
+ CECA4 (39),0.75,0.6,0.6667,5.0
42
+ CECAC (40),1.0,1.0,1.0,1.0
43
+ CELA (41),0.2143,0.1714,0.1905,35.0
44
+ CEOC (42),0.1111,0.1667,0.1333,12.0
45
+ COFL2 (43),0.0,0.0,0.0,6.0
46
+ DIVI5 (44),0.0,0.0,0.0,1.0
47
+ FAGR (45),0.25,0.3962,0.3066,53.0
48
+ FRAM2 (46),0.0,0.0,0.0,11.0
49
+ FRAXI (47),0.25,0.5,0.3333,8.0
50
+ FRNI (48),0.2222,0.4,0.2857,5.0
51
+ FRPE (49),0.2727,0.2308,0.25,26.0
52
+ GLTR (50),0.0,0.0,0.0,3.0
53
+ GYDI (51),0.0,0.0,0.0,1.0
54
+ HATE3 (52),0.0,0.0,0.0,3.0
55
+ ILOP (53),0.0,0.0,0.0,1.0
56
+ JUNI (54),0.1667,0.4545,0.2439,11.0
57
+ JUOS (55),0.0,0.0,0.0,2.0
58
+ JUVI (56),0.5,0.2353,0.32,17.0
59
+ LALA (57),0.5,0.5,0.5,4.0
60
+ LIST2 (58),0.1864,0.1964,0.1913,56.0
61
+ LITU (59),0.4186,0.3051,0.3529,59.0
62
+ MAAC (60),0.25,0.25,0.25,4.0
63
+ MAFR (61),0.0,0.0,0.0,2.0
64
+ MAPO (62),0.1667,0.1429,0.1538,7.0
65
+ MEPO5 (63),1.0,0.7143,0.8333,7.0
66
+ MORU2 (64),0.0,0.0,0.0,6.0
67
+ NYAQ2 (65),0.0,0.0,0.0,1.0
68
+ NYBI (66),0.0,0.0,0.0,2.0
69
+ NYSY (67),0.1077,0.3043,0.1591,23.0
70
+ OSVI (68),0.0,0.0,0.0,1.0
71
+ OXAR (69),0.2667,0.2105,0.2353,19.0
72
+ PIAB (70),0.2667,0.5,0.3478,8.0
73
+ PIAL3 (71),1.0,0.6667,0.8,3.0
74
+ PICO (72),0.3,0.2308,0.2609,13.0
75
+ PICOL (73),0.529,0.7935,0.6348,92.0
76
+ PIEC2 (74),0.0,0.0,0.0,7.0
77
+ PIED (75),0.5,1.0,0.6667,1.0
78
+ PIEL (76),0.25,0.3333,0.2857,3.0
79
+ PIEN (77),0.5417,0.3714,0.4407,35.0
80
+ PIFL2 (78),0.5556,0.3333,0.4167,15.0
81
+ PIGL (79),0.2439,0.4348,0.3125,23.0
82
+ PIJE (80),0.2857,0.6667,0.4,3.0
83
+ PIMA (81),0.8542,0.7009,0.77,117.0
84
+ PIMO3 (82),0.0,0.0,0.0,2.0
85
+ PINACE (83),0.0,0.0,0.0,2.0
86
+ PINUS (84),0.0,0.0,0.0,4.0
87
+ PIPA2 (85),0.7067,0.5699,0.631,93.0
88
+ PIPO (86),0.6667,0.8,0.7273,10.0
89
+ PIPOS (87),0.45,0.5625,0.5,16.0
90
+ PIPU5 (88),0.2,1.0,0.3333,1.0
91
+ PIRE (89),0.4286,0.5,0.4615,12.0
92
+ PIRI (90),0.0,0.0,0.0,1.0
93
+ PIRU (91),0.2222,0.1176,0.1538,17.0
94
+ PISA2 (92),0.0,0.0,0.0,1.0
95
+ PIST (93),0.6,0.4138,0.4898,29.0
96
+ PITA (94),0.4444,0.6667,0.5333,18.0
97
+ PLOC (95),0.0,0.0,0.0,7.0
98
+ PODE3 (96),0.3333,1.0,0.5,1.0
99
+ POGR4 (97),0.1818,0.2222,0.2,9.0
100
+ POTR5 (98),0.5921,0.5921,0.5921,76.0
101
+ PRAM (99),0.0,0.0,0.0,1.0
102
+ PRME (100),0.0,0.0,0.0,1.0
103
+ PRPEP (101),0.0,0.0,0.0,1.0
104
+ PRSE2 (102),0.0,0.0,0.0,3.0
105
+ PRSES (103),0.0,0.0,0.0,3.0
106
+ PSME (104),0.375,0.2609,0.3077,23.0
107
+ PSMEM (105),0.5742,0.678,0.6218,177.0
108
+ QUAL (106),0.2,0.1395,0.1644,43.0
109
+ QUCH2 (107),0.3333,0.4,0.3636,5.0
110
+ QUCO2 (108),0.3333,0.2,0.25,15.0
111
+ QUDO (109),1.0,1.0,1.0,1.0
112
+ QUERC (110),0.0,0.0,0.0,7.0
113
+ QUFA (111),0.0,0.0,0.0,3.0
114
+ QUGE2 (112),0.0,0.0,0.0,2.0
115
+ QUHE2 (113),0.1818,0.2857,0.2222,7.0
116
+ QUKE (114),0.6,0.75,0.6667,4.0
117
+ QULA2 (115),0.3226,0.4545,0.3774,22.0
118
+ QULA3 (116),0.5,0.3333,0.4,3.0
119
+ QULY (117),0.3333,0.25,0.2857,4.0
120
+ QUMA13 (118),0.0,0.0,0.0,7.0
121
+ QUMA2 (119),0.0,0.0,0.0,1.0
122
+ QUMA3 (120),0.3,0.2727,0.2857,11.0
123
+ QUMI (121),0.0,0.0,0.0,5.0
124
+ QUMO4 (122),0.1739,0.25,0.2051,16.0
125
+ QUMU (123),0.4,0.4,0.4,5.0
126
+ QUNI (124),0.2222,0.1538,0.1818,13.0
127
+ QUPA5 (125),0.1111,0.1429,0.125,7.0
128
+ QUPH (126),0.0,0.0,0.0,2.0
129
+ QURU (127),0.4156,0.3855,0.4,83.0
130
+ QUSH (128),0.0,0.0,0.0,1.0
131
+ QUST (129),0.5091,0.6364,0.5657,44.0
132
+ QUVE (130),0.0,0.0,0.0,7.0
133
+ QUVI (131),0.0,0.0,0.0,1.0
134
+ QUWI2 (132),1.0,0.6667,0.8,3.0
135
+ ROPS (133),0.0,0.0,0.0,5.0
136
+ SAAL5 (134),0.1667,0.1667,0.1667,6.0
137
+ SILA20 (135),0.0,0.0,0.0,1.0
138
+ SYOR (136),0.0,0.0,0.0,2.0
139
+ TABR2 (137),0.0,0.0,0.0,4.0
140
+ THPL (138),0.0,0.0,0.0,6.0
141
+ TIAM (139),0.0,0.0,0.0,2.0
142
+ TRSE6 (140),0.0,0.0,0.0,2.0
143
+ TSCA (141),0.4957,0.4161,0.4524,137.0
144
+ TSHE (142),0.43,0.5443,0.4804,79.0
145
+ ULAL (143),0.2,0.25,0.2222,4.0
146
+ ULAM (144),0.3125,0.2273,0.2632,22.0
147
+ ULCR (145),0.0,0.0,0.0,5.0
148
+ ULMUS (146),0.0,0.0,0.0,3.0
149
+ ULRU (147),0.0,0.0,0.0,5.0
150
+ accuracy,0.393,0.393,0.393,0.393
151
+ macro avg,0.2471,0.2507,0.2323,2453.0
152
+ weighted avg,0.4046,0.393,0.387,2453.0
config.json ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cropmodel": {
3
+ "architecture": "resnet18",
4
+ "batch_size": 4,
5
+ "num_workers": 0,
6
+ "lr": 0.0001,
7
+ "scheduler": {
8
+ "type": "ReduceLROnPlateau",
9
+ "params": {
10
+ "mode": "min",
11
+ "factor": 0.5,
12
+ "patience": 5,
13
+ "threshold": 0.0001,
14
+ "threshold_mode": "rel",
15
+ "cooldown": 0,
16
+ "min_lr": 0,
17
+ "eps": 1e-08
18
+ }
19
+ },
20
+ "balance_classes": false,
21
+ "resize": [
22
+ 224,
23
+ 224
24
+ ],
25
+ "resize_interpolation": "nearest",
26
+ "expand": 0,
27
+ "label_dict": {
28
+ "2PLANT": 0,
29
+ "2PLANT-S": 1,
30
+ "ABAM": 2,
31
+ "ABBA": 3,
32
+ "ABCO": 4,
33
+ "ABFR": 5,
34
+ "ABIES": 6,
35
+ "ABLAL": 7,
36
+ "ABLO": 8,
37
+ "ABMA": 9,
38
+ "ACBA3": 10,
39
+ "ACCI": 11,
40
+ "ACNE2": 12,
41
+ "ACNEN": 13,
42
+ "ACPE": 14,
43
+ "ACRU": 15,
44
+ "ACRUR": 16,
45
+ "ACSA2": 17,
46
+ "ACSA3": 18,
47
+ "ACSAS": 19,
48
+ "ALRU2": 20,
49
+ "AMLA": 21,
50
+ "ARVIM": 22,
51
+ "BEAL2": 23,
52
+ "BELE": 24,
53
+ "BENE4": 25,
54
+ "BEPA": 26,
55
+ "BEPAP": 27,
56
+ "BEPO": 28,
57
+ "BOSU2": 29,
58
+ "BUBU": 30,
59
+ "BUSI": 31,
60
+ "CAAQ2": 32,
61
+ "CACA18": 33,
62
+ "CADE27": 34,
63
+ "CAGL8": 35,
64
+ "CAIL2": 36,
65
+ "CAOV2": 37,
66
+ "CATO6": 38,
67
+ "CECA4": 39,
68
+ "CECAC": 40,
69
+ "CELA": 41,
70
+ "CEOC": 42,
71
+ "COFL2": 43,
72
+ "DIVI5": 44,
73
+ "FAGR": 45,
74
+ "FRAM2": 46,
75
+ "FRAXI": 47,
76
+ "FRNI": 48,
77
+ "FRPE": 49,
78
+ "GLTR": 50,
79
+ "GYDI": 51,
80
+ "HATE3": 52,
81
+ "ILOP": 53,
82
+ "JUNI": 54,
83
+ "JUOS": 55,
84
+ "JUVI": 56,
85
+ "LALA": 57,
86
+ "LIST2": 58,
87
+ "LITU": 59,
88
+ "MAAC": 60,
89
+ "MAFR": 61,
90
+ "MAPO": 62,
91
+ "MEPO5": 63,
92
+ "MORU2": 64,
93
+ "NYAQ2": 65,
94
+ "NYBI": 66,
95
+ "NYSY": 67,
96
+ "OSVI": 68,
97
+ "OXAR": 69,
98
+ "PIAB": 70,
99
+ "PIAL3": 71,
100
+ "PICO": 72,
101
+ "PICOL": 73,
102
+ "PIEC2": 74,
103
+ "PIED": 75,
104
+ "PIEL": 76,
105
+ "PIEN": 77,
106
+ "PIFL2": 78,
107
+ "PIGL": 79,
108
+ "PIJE": 80,
109
+ "PIMA": 81,
110
+ "PIMO3": 82,
111
+ "PINACE": 83,
112
+ "PINUS": 84,
113
+ "PIPA2": 85,
114
+ "PIPO": 86,
115
+ "PIPOS": 87,
116
+ "PIPU5": 88,
117
+ "PIRE": 89,
118
+ "PIRI": 90,
119
+ "PIRU": 91,
120
+ "PISA2": 92,
121
+ "PIST": 93,
122
+ "PITA": 94,
123
+ "PLOC": 95,
124
+ "PODE3": 96,
125
+ "POGR4": 97,
126
+ "POTR5": 98,
127
+ "PRAM": 99,
128
+ "PRME": 100,
129
+ "PRPEP": 101,
130
+ "PRSE2": 102,
131
+ "PRSES": 103,
132
+ "PSME": 104,
133
+ "PSMEM": 105,
134
+ "QUAL": 106,
135
+ "QUCH2": 107,
136
+ "QUCO2": 108,
137
+ "QUDO": 109,
138
+ "QUERC": 110,
139
+ "QUFA": 111,
140
+ "QUGE2": 112,
141
+ "QUHE2": 113,
142
+ "QUKE": 114,
143
+ "QULA2": 115,
144
+ "QULA3": 116,
145
+ "QULY": 117,
146
+ "QUMA13": 118,
147
+ "QUMA2": 119,
148
+ "QUMA3": 120,
149
+ "QUMI": 121,
150
+ "QUMO4": 122,
151
+ "QUMU": 123,
152
+ "QUNI": 124,
153
+ "QUPA5": 125,
154
+ "QUPH": 126,
155
+ "QURU": 127,
156
+ "QUSH": 128,
157
+ "QUST": 129,
158
+ "QUVE": 130,
159
+ "QUVI": 131,
160
+ "QUWI2": 132,
161
+ "ROPS": 133,
162
+ "SAAL5": 134,
163
+ "SILA20": 135,
164
+ "SYOR": 136,
165
+ "TABR2": 137,
166
+ "THPL": 138,
167
+ "TIAM": 139,
168
+ "TRSE6": 140,
169
+ "TSCA": 141,
170
+ "TSHE": 142,
171
+ "ULAL": 143,
172
+ "ULAM": 144,
173
+ "ULCR": 145,
174
+ "ULMUS": 146,
175
+ "ULRU": 147
176
+ }
177
+ }
178
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9650d14260c83e79184e8de13c46f37bcfee3707d6c44076e73222959700dced
3
+ size 45059816