gauthambalraj07@gmail.com commited on
Commit
f97459f
·
1 Parent(s): 3dc870c
Files changed (2) hide show
  1. test.ipynb +3 -3
  2. utils.py +1 -1
test.ipynb CHANGED
@@ -2,7 +2,7 @@
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
- "execution_count": 4,
6
  "metadata": {},
7
  "outputs": [
8
  {
@@ -12,7 +12,7 @@
12
  "Processing imscdr_ac_in___8.png...\n",
13
  "Status Code: 500\n",
14
  "Response Text: {\"detail\":\"BaseModel.predict() got an unexpected keyword argument 'conf'\"}\n",
15
- "Finished processing imscdr_ac_in___8.png in 10.38 seconds\n",
16
  "Processing imscdr_ac_in___9.png...\n",
17
  "Status Code: 500\n",
18
  "Response Text: <!DOCTYPE html>\n",
@@ -124,7 +124,7 @@
124
  "</body>\n",
125
  "</html>\n",
126
  "\n",
127
- "Finished processing imscdr_ac_in___9.png in 10.32 seconds\n",
128
  "{}\n"
129
  ]
130
  }
 
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
+ "execution_count": 1,
6
  "metadata": {},
7
  "outputs": [
8
  {
 
12
  "Processing imscdr_ac_in___8.png...\n",
13
  "Status Code: 500\n",
14
  "Response Text: {\"detail\":\"BaseModel.predict() got an unexpected keyword argument 'conf'\"}\n",
15
+ "Finished processing imscdr_ac_in___8.png in 10.20 seconds\n",
16
  "Processing imscdr_ac_in___9.png...\n",
17
  "Status Code: 500\n",
18
  "Response Text: <!DOCTYPE html>\n",
 
124
  "</body>\n",
125
  "</html>\n",
126
  "\n",
127
+ "Finished processing imscdr_ac_in___9.png in 11.98 seconds\n",
128
  "{}\n"
129
  ]
130
  }
utils.py CHANGED
@@ -385,7 +385,7 @@ def predict_yolo(model, image_path, box_threshold, imgsz, scale_img, iou_thresho
385
  }
386
  if scale_img:
387
  kwargs['imgsz'] = imgsz
388
- result = model(image_path, **kwargs)
389
  boxes = result[0].boxes.xyxy#.tolist() # in pixel space
390
  conf = result[0].boxes.conf
391
  phrases = [str(i) for i in range(len(boxes))]
 
385
  }
386
  if scale_img:
387
  kwargs['imgsz'] = imgsz
388
+ result = model(image_path )
389
  boxes = result[0].boxes.xyxy#.tolist() # in pixel space
390
  conf = result[0].boxes.conf
391
  phrases = [str(i) for i in range(len(boxes))]