-
Notifications
You must be signed in to change notification settings - Fork 6
Merge UKCEH/Turing regional classifiers (#72) #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
f4e8316
5645129
3e6d5c0
786e6ce
b3b5364
e064385
73f1e7e
58674fe
2a54ae6
755b13c
5badf14
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -15,8 +15,13 @@ | |||||||||||||
| PanamaMothSpeciesClassifierMixedResolution2023, | ||||||||||||||
| QuebecVermontMothSpeciesClassifier2024, | ||||||||||||||
| TuringAnguillaSpeciesClassifier, | ||||||||||||||
| TuringAnguillaV02SpeciesClassifier, | ||||||||||||||
| TuringCostaRicaSpeciesClassifier, | ||||||||||||||
| TuringJapanSpeciesClassifier, | ||||||||||||||
| TuringKenyaUgandaSpeciesClassifier, | ||||||||||||||
| TuringMadagascarSpeciesClassifier, | ||||||||||||||
| TuringSingaporeSpeciesClassifier, | ||||||||||||||
| TuringThailandSpeciesClassifier, | ||||||||||||||
| UKDenmarkMothSpeciesClassifier2024, | ||||||||||||||
| ) | ||||||||||||||
|
|
||||||||||||||
|
|
@@ -219,12 +224,39 @@ class MothClassifierTuringAnguilla(APIMothClassifier, TuringAnguillaSpeciesClass | |||||||||||||
| pass | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| class MothClassifierTuringAnguillaV02( | ||||||||||||||
| APIMothClassifier, TuringAnguillaV02SpeciesClassifier | ||||||||||||||
| ): | ||||||||||||||
| pass | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| class MothClassifierTuringJapan(APIMothClassifier, TuringJapanSpeciesClassifier): | ||||||||||||||
| pass | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| class MothClassifierTuringKenyaUganda( | ||||||||||||||
| APIMothClassifier, TuringKenyaUgandaSpeciesClassifier | ||||||||||||||
| ): | ||||||||||||||
| pass | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| class MothClassifierTuringMadagascar( | ||||||||||||||
| APIMothClassifier, TuringMadagascarSpeciesClassifier | ||||||||||||||
| ): | ||||||||||||||
| pass | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| class MothClassifierTuringThailand(APIMothClassifier, TuringThailandSpeciesClassifier): | ||||||||||||||
| pass | ||||||||||||||
|
Comment on lines
+249
to
+250
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Line 253 has ♻️ Suggested comment+# Disabled: model weights have 3800 output neurons but category map lists 3822 classes;
+# state_dict load will fail with a size-mismatch RuntimeError until corrected data is available.
class MothClassifierTuringThailand(APIMothClassifier, TuringThailandSpeciesClassifier):📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| # Disabled: category map not available at this time | ||||||||||||||
| class MothClassifierTuringSingapore( | ||||||||||||||
| APIMothClassifier, TuringSingaporeSpeciesClassifier | ||||||||||||||
| ): | ||||||||||||||
| pass | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| class MothClassifierGlobal(APIMothClassifier, GlobalMothSpeciesClassifier): | ||||||||||||||
| pass | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -422,6 +422,19 @@ class TuringAnguillaSpeciesClassifier(SpeciesClassifier, Resnet50Classifier_Turi | |||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| class TuringAnguillaV02SpeciesClassifier(SpeciesClassifier, Resnet50Classifier_Turing): | ||||||||||||||||||||||||||||
| name = "Turing Anguilla Species Classifier v02 (160 classes)" | ||||||||||||||||||||||||||||
| description = "Trained on 19th November 2024 by Turing team using Resnet50 model. 160 classes." | ||||||||||||||||||||||||||||
| weights_path = ( | ||||||||||||||||||||||||||||
| "https://object-arbutus.cloud.computecanada.ca/ami-models/moths/classification/" | ||||||||||||||||||||||||||||
| "turing-anguilla_v02_resnet50_2024-11-19-19-17_state.pt" | ||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||
| labels_path = ( | ||||||||||||||||||||||||||||
| "https://object-arbutus.cloud.computecanada.ca/ami-models/moths/classification/" | ||||||||||||||||||||||||||||
| "02_anguilla_data_category_map_160cls.json" | ||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| class TuringKenyaUgandaSpeciesClassifier(SpeciesClassifier, Resnet50Classifier_Turing): | ||||||||||||||||||||||||||||
| name = "Turing Kenya and Uganda Species Classifier" | ||||||||||||||||||||||||||||
| description = "Trained on 19th November 2024 by Turing team using Resnet50 model." | ||||||||||||||||||||||||||||
|
|
@@ -435,6 +448,37 @@ class TuringKenyaUgandaSpeciesClassifier(SpeciesClassifier, Resnet50Classifier_T | |||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| class TuringThailandSpeciesClassifier(SpeciesClassifier, Resnet50Classifier_Turing): | ||||||||||||||||||||||||||||
| name = "Turing Thailand Species Classifier" | ||||||||||||||||||||||||||||
| description = "Trained on 11th November 2024 by Turing team using Resnet50 model." | ||||||||||||||||||||||||||||
| weights_path = "https://object-arbutus.cloud.computecanada.ca/ami-models/moths/classification/turing-thailand_v01_resnet50_2024-11-21-16-28_state.pt" | ||||||||||||||||||||||||||||
|
Comment on lines
+453
to
+454
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inaccurate training dates in descriptions — Madagascar is significantly wrong. Cross-referencing the
The Madagascar discrepancy is the most critical — the description is ~4 months off and contradicts the filename. Please verify with the Turing team and correct before merging. 📝 Proposed corrections class TuringThailandSpeciesClassifier(SpeciesClassifier, Resnet50Classifier_Turing):
name = "Turing Thailand Species Classifier"
- description = "Trained on 11th November 2024 by Turing team using Resnet50 model."
+ description = "Trained on 21st November 2024 by Turing team using Resnet50 model."
class TuringMadagascarSpeciesClassifier(SpeciesClassifier, Resnet50Classifier_Turing):
name = "Turing Madagascar Species Classifier"
- description = "Trained on 11th November 2024 by Turing team using Resnet50 model."
+ description = "Trained on 1st July 2024 by Turing team using Resnet50 model."
class TuringJapanSpeciesClassifier(SpeciesClassifier, Resnet50Classifier_Turing):
name = "Turing Japan Species Classifier"
- description = "Trained on 19th November 2024 by Turing team using Resnet50 model."
+ description = "Trained on 22nd November 2024 by Turing team using Resnet50 model."Also applies to: 447-448, 454-455 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
| labels_path = "https://object-arbutus.cloud.computecanada.ca/ami-models/moths/classification/01_thailand_data_category_map.json" | ||||||||||||||||||||||||||||
|
Comment on lines
+451
to
+455
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thailand class is missing a disable note — unlike Singapore.
🛡️ Suggested comment block+# NOTE: Thailand model has a class-count mismatch: category map lists 3822 classes
+# but the model was trained with 3800 output neurons. Loading state_dict will fail
+# with a size-mismatch RuntimeError. Disabled until corrected weights or map is provided.
class TuringThailandSpeciesClassifier(SpeciesClassifier, Resnet50Classifier_Turing):📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| class TuringMadagascarSpeciesClassifier(SpeciesClassifier, Resnet50Classifier_Turing): | ||||||||||||||||||||||||||||
| name = "Turing Madagascar Species Classifier" | ||||||||||||||||||||||||||||
| description = "Trained on 11th November 2024 by Turing team using Resnet50 model." | ||||||||||||||||||||||||||||
| weights_path = "https://object-arbutus.cloud.computecanada.ca/ami-models/moths/classification/turing-madagascar_v01_resnet50_2024-07-01-13-01_state.pt" | ||||||||||||||||||||||||||||
| labels_path = "https://object-arbutus.cloud.computecanada.ca/ami-models/moths/classification/01_madagascar_data_category_map.json" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| class TuringJapanSpeciesClassifier(SpeciesClassifier, Resnet50Classifier_Turing): | ||||||||||||||||||||||||||||
| name = "Turing Japan Species Classifier" | ||||||||||||||||||||||||||||
| description = "Trained on 19th November 2024 by Turing team using Resnet50 model." | ||||||||||||||||||||||||||||
| weights_path = "https://object-arbutus.cloud.computecanada.ca/ami-models/moths/classification/turing-japan_v01_resnet50_2024-11-22-17-22_state.pt" | ||||||||||||||||||||||||||||
| labels_path = "https://object-arbutus.cloud.computecanada.ca/ami-models/moths/classification/01_japan_data_category_map.json" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # NOTE: Singapore category map (02_singapore_data_category_map.json) is not available | ||||||||||||||||||||||||||||
| # in the object store. Weights are uploaded but pipeline is disabled until the | ||||||||||||||||||||||||||||
| # category map is sourced and uploaded. | ||||||||||||||||||||||||||||
| class TuringSingaporeSpeciesClassifier(SpeciesClassifier, Resnet50Classifier_Turing): | ||||||||||||||||||||||||||||
| name = "Turing Singapore Species Classifier" | ||||||||||||||||||||||||||||
| description = "Trained on 21st November 2024 by Turing team using Resnet50 model." | ||||||||||||||||||||||||||||
| weights_path = "https://object-arbutus.cloud.computecanada.ca/ami-models/moths/classification/turing-singapore_v02_resnet50_2024-11-21-19-58_state.pt" | ||||||||||||||||||||||||||||
| labels_path = "https://object-arbutus.cloud.computecanada.ca/ami-models/moths/classification/02_singapore_data_category_map.json" | ||||||||||||||||||||||||||||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| class TuringUKSpeciesClassifier(SpeciesClassifier, Resnet50Classifier_Turing): | ||||||||||||||||||||||||||||
| name = "Turing UK Species Classifier" | ||||||||||||||||||||||||||||
| description = "Trained on 13th May 2024 by Turing team using Resnet50 model." | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the unused
noqa: E501directive flagged by Ruff (RUF100).E501is not enabled in the linter config, so the suppression comment is dead. The explanatory text after it is useful and should be kept as a plain comment.♻️ Proposed fix
📝 Committable suggestion
🧰 Tools
🪛 Ruff (0.15.1)
[warning] 16-16: Unused
noqadirective (non-enabled:E501)Remove unused
noqadirective(RUF100)
🤖 Prompt for AI Agents