Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions trapdata/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
MothClassifierQuebecVermont,
MothClassifierTuringAnguilla,
MothClassifierTuringCostaRica,
MothClassifierTuringJapan,
MothClassifierTuringKenyaUganda,
MothClassifierTuringMadagascar,
MothClassifierTuringSingapore,
MothClassifierTuringThailand,
MothClassifierUKDenmark,
)
from .models.localization import APIMothDetector
Expand All @@ -45,6 +50,11 @@
"uk_denmark_moths_2023": MothClassifierUKDenmark,
"costa_rica_moths_turing_2024": MothClassifierTuringCostaRica,
"anguilla_moths_turing_2024": MothClassifierTuringAnguilla,
"singapore_moths_turing_2024": MothClassifierTuringSingapore,
"thailand_moths_turing_2024": MothClassifierTuringThailand,
"madagascar_moths_turing_2024": MothClassifierTuringMadagascar,
"kenya-uganda_moths_turing_2024": MothClassifierTuringKenyaUganda,
"japan_moths_turing_2024": MothClassifierTuringJapan,
"global_moths_2024": MothClassifierGlobal,
"moth_binary": MothClassifierBinary,
}
Expand Down
31 changes: 31 additions & 0 deletions trapdata/api/models/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
QuebecVermontMothSpeciesClassifier2024,
TuringAnguillaSpeciesClassifier,
TuringCostaRicaSpeciesClassifier,
TuringJapanSpeciesClassifier,
TuringKenyaUgandaSpeciesClassifier,
TuringMadagascarSpeciesClassifier,
TuringSingaporeSpeciesClassifier,
TuringThailandSpeciesClassifier,
UKDenmarkMothSpeciesClassifier2024,
)

Expand Down Expand Up @@ -186,5 +191,31 @@ class MothClassifierTuringAnguilla(APIMothClassifier, TuringAnguillaSpeciesClass
pass


class MothClassifierTuringJapan(APIMothClassifier, TuringJapanSpeciesClassifier):
pass


class MothClassifierTuringKenyaUganda(
APIMothClassifier, TuringKenyaUgandaSpeciesClassifier
):
pass


class MothClassifierTuringMadagascar(
APIMothClassifier, TuringMadagascarSpeciesClassifier
):
pass


class MothClassifierTuringThailand(APIMothClassifier, TuringThailandSpeciesClassifier):
pass


class MothClassifierTuringSingapore(
APIMothClassifier, TuringSingaporeSpeciesClassifier
):
pass


class MothClassifierGlobal(APIMothClassifier, GlobalMothSpeciesClassifier):
pass
35 changes: 35 additions & 0 deletions trapdata/ml/models/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,41 @@ class TuringAnguillaSpeciesClassifier(SpeciesClassifier, Resnet50Classifier_Turi
labels_path = "https://object-arbutus.cloud.computecanada.ca/ami-models/moths/classification/01_anguilla_data_category_map.json"


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"
labels_path = "https://object-arbutus.cloud.computecanada.ca/ami-models/moths/classification//01_thailand_data_category_map.json"


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 TuringKenyaUgandaSpeciesClassifier(SpeciesClassifier, Resnet50Classifier_Turing):
name = "Turing Kenya and Uganda 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-kenya-uganda_v01_resnet50_2024-11-19-18-44_state.pt"
labels_path = "https://object-arbutus.cloud.computecanada.ca/ami-models/moths/classification//01_kenya-uganda_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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These weight files don't actually exist in this location (yet).

labels_path = "https://object-arbutus.cloud.computecanada.ca/ami-models/moths/classification//01_japan_data_category_map.json"


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"


class TuringUKSpeciesClassifier(SpeciesClassifier, Resnet50Classifier_Turing):
name = "Turing UK Species Classifier"
description = "Trained on 13th May 2024 by Turing team using Resnet50 model."
Expand Down
Loading