m7mdal7aj commited on
Commit
311b9c4
1 Parent(s): 97a9791

Update my_model/object_detection.py

Browse files
Files changed (1) hide show
  1. my_model/object_detection.py +4 -4
my_model/object_detection.py CHANGED
@@ -5,8 +5,8 @@ from PIL import Image, ImageDraw, ImageFont
5
  import numpy as np
6
  import cv2
7
  import os
8
- from my_model.utilities import get_path, show_image
9
- import models.deformable-detr-detic as detic
10
 
11
 
12
 
@@ -62,8 +62,8 @@ class ObjectDetector:
62
  """
63
 
64
  try:
65
- #model_path = get_path('deformable-detr-detic', 'models') # for use locally
66
- model_path = detic # for use on HF only
67
  self.processor = AutoImageProcessor.from_pretrained(model_path)
68
  self.model = AutoModelForObjectDetection.from_pretrained(model_path)
69
  except Exception as e:
 
5
  import numpy as np
6
  import cv2
7
  import os
8
+ from my_model.utilities import get_image_path, get_model_path ,show_image
9
+
10
 
11
 
12
 
 
62
  """
63
 
64
  try:
65
+ model_path = get_model_path('deformable-detr-detic')
66
+
67
  self.processor = AutoImageProcessor.from_pretrained(model_path)
68
  self.model = AutoModelForObjectDetection.from_pretrained(model_path)
69
  except Exception as e: