Sudipta Nayak commited on
Commit
b243d19
1 Parent(s): 183e7ee

Code changes

Browse files
app/main.py CHANGED
@@ -48,16 +48,19 @@ async def detect_objects(request: Request, file: UploadFile):
48
  print('Detect start')
49
 
50
  # Run YOLOv7 detection and save output
51
- subprocess.run(["python", "app/detect.py", "--conf", "0.5", "--img-size", "640", "--weights", "app/model/best.pt", "--no-trace",
52
- "--source", str(input_file_path), "--save-txt", "--save-conf", "--exist-ok", "--project", str(output_file_path)], check=True)
53
 
54
  print('Detect end')
55
 
56
  # original_image_path = str(input_file_path)
57
  # output_image_path = f"{output_file_path}/exp/{file.filename}"
58
 
59
- original_image_path = f"../static/{file.filename}"
60
- output_image_path = f"../static/output/{file.filename}"
 
 
 
61
 
62
  print('original_image path :', str(original_image_path))
63
  print('output_image_path path :', str(output_image_path))
 
48
  print('Detect start')
49
 
50
  # Run YOLOv7 detection and save output
51
+ # subprocess.run(["python", "app/detect.py", "--conf", "0.5", "--img-size", "640", "--weights", "app/model/best.pt", "--no-trace",
52
+ # "--source", str(input_file_path), "--save-txt", "--save-conf", "--exist-ok", "--project", str(output_file_path)], check=True)
53
 
54
  print('Detect end')
55
 
56
  # original_image_path = str(input_file_path)
57
  # output_image_path = f"{output_file_path}/exp/{file.filename}"
58
 
59
+ original_image_path = f"../static/cbd64c44-cdb37ccb.jpg"
60
+ output_image_path = f"../static/output/cbd64c44-cdb37ccb.jpg"
61
+
62
+ # original_image_path = f"../static/{file.filename}"
63
+ # output_image_path = f"../static/output/{file.filename}"
64
 
65
  print('original_image path :', str(original_image_path))
66
  print('output_image_path path :', str(output_image_path))
app/static/cbd64c44-cdb37ccb.jpg ADDED
app/static/output/cbd64c44-cdb37ccb.jpg ADDED