Spaces:
Sleeping
Sleeping
Theivaprakasham Hari
commited on
Commit
·
f6cfe33
1
Parent(s):
4ab35b1
fixed path
Browse files
app.py
CHANGED
|
@@ -3,11 +3,14 @@ import numpy as np
|
|
| 3 |
from PIL import Image
|
| 4 |
from ultralytics import YOLO
|
| 5 |
import cv2
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
# Model configurations
|
| 8 |
MODEL_CONFIGS = {
|
| 9 |
"Dry Season Form": {
|
| 10 |
-
"path":
|
| 11 |
"labels": [
|
| 12 |
"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16",
|
| 13 |
"H1", "H2", "H3", "H4", "H5", "H6", "H7", "H8", "H9", "H10", "H11", "H12", "H13", "H14", "H15", "H16", "H17",
|
|
@@ -19,7 +22,7 @@ MODEL_CONFIGS = {
|
|
| 19 |
"imgsz": 1280
|
| 20 |
},
|
| 21 |
"Wet Season Form": {
|
| 22 |
-
"path":
|
| 23 |
"labels": [
|
| 24 |
'F12', 'F14', 'fs1', 'fs2', 'fs3', 'fs4', 'fs5',
|
| 25 |
'H12', 'H14', 'hs1', 'hs2', 'hs3', 'hs4', 'hs5', 'hs6',
|
|
@@ -28,7 +31,7 @@ MODEL_CONFIGS = {
|
|
| 28 |
"imgsz": 1280
|
| 29 |
},
|
| 30 |
"All Season Form": {
|
| 31 |
-
"path":
|
| 32 |
"labels": [
|
| 33 |
"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16",
|
| 34 |
"H1", "H2", "H3", "H4", "H5", "H6", "H7", "H8", "H9", "H10", "H11", "H12", "H13", "H14", "H15", "H16", "H17",
|
|
|
|
| 3 |
from PIL import Image
|
| 4 |
from ultralytics import YOLO
|
| 5 |
import cv2
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
|
| 8 |
+
path = Path(__file__).parent
|
| 9 |
|
| 10 |
# Model configurations
|
| 11 |
MODEL_CONFIGS = {
|
| 12 |
"Dry Season Form": {
|
| 13 |
+
"path": path/"models/DSF_Mleda_250.pt",
|
| 14 |
"labels": [
|
| 15 |
"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16",
|
| 16 |
"H1", "H2", "H3", "H4", "H5", "H6", "H7", "H8", "H9", "H10", "H11", "H12", "H13", "H14", "H15", "H16", "H17",
|
|
|
|
| 22 |
"imgsz": 1280
|
| 23 |
},
|
| 24 |
"Wet Season Form": {
|
| 25 |
+
"path": path/"models/WSF_Mleda_200.pt",
|
| 26 |
"labels": [
|
| 27 |
'F12', 'F14', 'fs1', 'fs2', 'fs3', 'fs4', 'fs5',
|
| 28 |
'H12', 'H14', 'hs1', 'hs2', 'hs3', 'hs4', 'hs5', 'hs6',
|
|
|
|
| 31 |
"imgsz": 1280
|
| 32 |
},
|
| 33 |
"All Season Form": {
|
| 34 |
+
"path": path/"models/DSF_WSF_Mleda_450.pt",
|
| 35 |
"labels": [
|
| 36 |
"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16",
|
| 37 |
"H1", "H2", "H3", "H4", "H5", "H6", "H7", "H8", "H9", "H10", "H11", "H12", "H13", "H14", "H15", "H16", "H17",
|