Print what we're returning

This commit is contained in:
niten 2023-01-10 15:46:08 -08:00
parent 928ce39d68
commit 77813871a2
1 changed files with 5 additions and 3 deletions

View File

@ -76,8 +76,8 @@ def detection_to_dict(d):
"label": d.label,
"confidence": d.confidence,
"box": {
"pos_x": d.box[0],
"pos_y": d.box[1],
"x": d.box[0],
"y": d.box[1],
"width": d.box[2],
"height": d.box[3],
},
@ -128,7 +128,9 @@ def analyze_image(request: Request, image: UploadFile):
result = detector.detect_objects(infile, file_hash.hexdigest() + ".png")
print("image analyzed")
remove(infile)
return result_to_dict(result, base_url)
ret = result_to_dict(result, base_url)
print(ret)
return ret
@app.get("/analyzed_images/${image_name}", response_class=FileResponse)
def get_analyzed_image(image_name):