DurgaDeepak commited on
Commit
8386bf1
·
verified ·
1 Parent(s): 5567efd

Update models/detection/detector.py

Browse files
Files changed (1) hide show
  1. models/detection/detector.py +3 -1
models/detection/detector.py CHANGED
@@ -2,10 +2,12 @@ import logging
2
  from PIL import Image, ImageDraw
3
  from huggingface_hub import hf_hub_download
4
  from ultralytics import YOLO
 
5
 
6
 
7
- logger = logging.getLogger(__name__)
8
 
 
 
9
  class ObjectDetector:
10
  """
11
  Generalized Object Detection Wrapper for YOLOv5, YOLOv8, and future variants.
 
2
  from PIL import Image, ImageDraw
3
  from huggingface_hub import hf_hub_download
4
  from ultralytics import YOLO
5
+ import shutil
6
 
7
 
 
8
 
9
+ logger = logging.getLogger(__name__)
10
+ shutil.rmtree("models/detection/weights", ignore_errors=True)
11
  class ObjectDetector:
12
  """
13
  Generalized Object Detection Wrapper for YOLOv5, YOLOv8, and future variants.