[email protected] commited on
Commit
58a221d
·
1 Parent(s): f97459f
Files changed (2) hide show
  1. test.ipynb +4 -4
  2. utils.py +1 -1
test.ipynb CHANGED
@@ -2,7 +2,7 @@
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
- "execution_count": 1,
6
  "metadata": {},
7
  "outputs": [
8
  {
@@ -11,8 +11,8 @@
11
  "text": [
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,7 +124,7 @@
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
  }
 
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
+ "execution_count": 2,
6
  "metadata": {},
7
  "outputs": [
8
  {
 
11
  "text": [
12
  "Processing imscdr_ac_in___8.png...\n",
13
  "Status Code: 500\n",
14
+ "Response Text: {\"detail\":\"conv2d() received an invalid combination of arguments - got (str, Parameter, NoneType, tuple, tuple, tuple, int), but expected one of:\\n * (Tensor input, Tensor weight, Tensor bias, tuple of ints stride, tuple of ints padding, tuple of ints dilation, int groups)\\n didn't match because some of the arguments have invalid types: (!str!, !Parameter!, !NoneType!, !tuple of (int, int)!, !tuple of (int, int)!, !tuple of (int, int)!, int)\\n * (Tensor input, Tensor weight, Tensor bias, tuple of ints stride, str padding, tuple of ints dilation, int groups)\\n didn't match because some of the arguments have invalid types: (!str!, !Parameter!, !NoneType!, !tuple of (int, int)!, !tuple of (int, int)!, !tuple of (int, int)!, int)\\n\"}\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
  "</body>\n",
125
  "</html>\n",
126
  "\n",
127
+ "Finished processing imscdr_ac_in___9.png in 11.36 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 )
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, **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))]