sofmi commited on
Commit
e3ad8c1
β€’
1 Parent(s): 17e6342

changed behaviour re detection threshold

Browse files

Before: the pose estimation was not computed if the confidence for the bounding box detection was below the bbox threshold, but the bounding box was still shown.
For a detection threshold = 95%:
![cats_before.png](https://s3.amazonaws.com/moonup/production/uploads/1660816884239-62c2e231c0bc389b1716c36c.png)

Now: the bounding box is not shown if the detection confidence is below threshold
![cats_after.png](https://s3.amazonaws.com/moonup/production/uploads/1660817017265-62c2e231c0bc389b1716c36c.png)

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -296,7 +296,7 @@ def predict_pipeline(img_input,
296
  dlc_proc)
297
 
298
  # Produce final image
299
- img_background = Image.fromarray(md_results.imgs[0]) # img_input?
300
  for ic, (np_crop, kpts_crop) in enumerate(zip(list_crops,
301
  list_kpts_per_crop)):
302
 
 
296
  dlc_proc)
297
 
298
  # Produce final image
299
+ img_background = img_input # img_input or Image.fromarray(md_results.imgs[0])?
300
  for ic, (np_crop, kpts_crop) in enumerate(zip(list_crops,
301
  list_kpts_per_crop)):
302