supritg commited on
Commit
cfe8cd2
1 Parent(s): 08f03ab
Files changed (2) hide show
  1. app.py +5 -3
  2. yolov8n.pt +3 -0
app.py CHANGED
@@ -20,12 +20,14 @@ def yolov8_predict_func(image : gr.Image = None, # uploading an image as input
20
  # Performing the detection on the YOLO Image
21
 
22
  results = model.predict(
23
- image,
24
  conf = conf_threshold,
25
  iou = iou_threshold,
26
  imgsz = image_size
27
  )
28
 
 
 
29
  # Displaying the detected object's information
30
 
31
  # box = results[0].boxes
@@ -35,7 +37,7 @@ def yolov8_predict_func(image : gr.Image = None, # uploading an image as input
35
 
36
  # Rendering the output image with bounding boxes around detected objects
37
 
38
- render = render_result(model = model, image = image, result = results[0])
39
 
40
  return render
41
 
@@ -62,4 +64,4 @@ yolo_app = gr.Interface(
62
  cache_examples = True
63
  )
64
 
65
- yolo_app.launch()
 
20
  # Performing the detection on the YOLO Image
21
 
22
  results = model.predict(
23
+ source = image,
24
  conf = conf_threshold,
25
  iou = iou_threshold,
26
  imgsz = image_size
27
  )
28
 
29
+ print(results)
30
+
31
  # Displaying the detected object's information
32
 
33
  # box = results[0].boxes
 
37
 
38
  # Rendering the output image with bounding boxes around detected objects
39
 
40
+ render = render_result(model = model, image = image, result = int(results[0].obb[0].cls))
41
 
42
  return render
43
 
 
64
  cache_examples = True
65
  )
66
 
67
+ yolo_app.launch(share = True)
yolov8n.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31e20dde3def09e2cf938c7be6fe23d9150bbbe503982af13345706515f2ef95
3
+ size 6534387