SuriRaja commited on
Commit
a16535f
·
1 Parent(s): 0502fbb

Delete detection_service.py

Browse files
Files changed (1) hide show
  1. detection_service.py +0 -9
detection_service.py DELETED
@@ -1,9 +0,0 @@
1
- from transformers import pipeline
2
- import cv2
3
-
4
- object_detector = pipeline("object-detection", model="facebook/detr-resnet-50")
5
-
6
- def detect_objects(image_path):
7
- image = cv2.imread(image_path)
8
- results = object_detector(image)
9
- return [r for r in results if r['score'] > 0.7]