Spaces:
Running
Running
admin
commited on
Commit
·
b27c653
1
Parent(s):
6c5f1c9
rename org name
Browse files- app.py +1 -1
- insectid/detector.py +1 -1
- insectid/identifier.py +2 -2
app.py
CHANGED
@@ -6,7 +6,7 @@ from PIL import Image
|
|
6 |
from modelscope import snapshot_download
|
7 |
from insectid import InsectDetector, InsectIdentifier
|
8 |
|
9 |
-
MODEL_DIR = snapshot_download("
|
10 |
|
11 |
|
12 |
def infer(filename: str):
|
|
|
6 |
from modelscope import snapshot_download
|
7 |
from insectid import InsectDetector, InsectIdentifier
|
8 |
|
9 |
+
MODEL_DIR = snapshot_download("Genius-Society/insecta", cache_dir="./insectid/__pycache__")
|
10 |
|
11 |
|
12 |
def infer(filename: str):
|
insectid/detector.py
CHANGED
@@ -10,7 +10,7 @@ class InsectDetector(OnnxModel):
|
|
10 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
11 |
model_path = os.path.join(
|
12 |
current_dir,
|
13 |
-
"__pycache__/
|
14 |
)
|
15 |
self.input_width = 640
|
16 |
self.input_height = 640
|
|
|
10 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
11 |
model_path = os.path.join(
|
12 |
current_dir,
|
13 |
+
"__pycache__/Genius-Society/insecta/quarrying_insect_detector.onnx",
|
14 |
)
|
15 |
self.input_width = 640
|
16 |
self.input_height = 640
|
insectid/identifier.py
CHANGED
@@ -12,11 +12,11 @@ class InsectIdentifier(OnnxModel):
|
|
12 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
13 |
model_path = os.path.join(
|
14 |
current_dir,
|
15 |
-
"__pycache__/
|
16 |
)
|
17 |
label_map_path = os.path.join(
|
18 |
current_dir,
|
19 |
-
"__pycache__/
|
20 |
)
|
21 |
super(InsectIdentifier, self).__init__(model_path)
|
22 |
self.label_name_dict = self._get_label_name_dict(label_map_path)
|
|
|
12 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
13 |
model_path = os.path.join(
|
14 |
current_dir,
|
15 |
+
"__pycache__/Genius-Society/insecta/quarrying_insect_identifier.onnx",
|
16 |
)
|
17 |
label_map_path = os.path.join(
|
18 |
current_dir,
|
19 |
+
"__pycache__/Genius-Society/insecta/quarrying_insectid_label_map.txt",
|
20 |
)
|
21 |
super(InsectIdentifier, self).__init__(model_path)
|
22 |
self.label_name_dict = self._get_label_name_dict(label_map_path)
|