vchiang001 commited on
Commit
d81c118
β€’
1 Parent(s): 54cbac5

tried to change it back so that the image runs

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -211,7 +211,7 @@ def predict_pipeline(img_input,
211
  color='red',
212
  radius=2,
213
  use_normalized_coordinates=False)
214
- return img_input
215
 
216
  else:
217
  # Compute kpts for each crop
@@ -240,7 +240,7 @@ def predict_pipeline(img_input,
240
  img_background.paste(img_crop,
241
  box = tuple([int(math.floor(t)) for t in md_results.xyxy[0][ic,:2]]))
242
 
243
- return img_background #Image.fromarray(list_crops[0]) #Image.fromarray(md_results.imgs[0]) #list_annotated_crops #
244
 
245
 
246
  ##########################################################
@@ -299,7 +299,8 @@ gr_pose_output = gr.Dataframe(headers=['bodypart', 'x', 'y', 'confidence'],
299
  label='pose coordinates')
300
 
301
  outputs = [gr_gallery_output, #gr_json_output,
302
- gr_pose_output,]
 
303
 
304
  gr_title = "MegaDetector v5 + DLClive"
305
  gr_description = "Detect and estimate the pose of animals in camera trap images, using MegaDetector v5a + DeepLabCut-live. \
 
211
  color='red',
212
  radius=2,
213
  use_normalized_coordinates=False)
214
+ return img_input, #list_kpts_per_crop
215
 
216
  else:
217
  # Compute kpts for each crop
 
240
  img_background.paste(img_crop,
241
  box = tuple([int(math.floor(t)) for t in md_results.xyxy[0][ic,:2]]))
242
 
243
+ return img_background, #list_kpts_per_crop, #Image.fromarray(list_crops[0]) #Image.fromarray(md_results.imgs[0]) #list_annotated_crops #
244
 
245
 
246
  ##########################################################
 
299
  label='pose coordinates')
300
 
301
  outputs = [gr_gallery_output, #gr_json_output,
302
+ #gr_pose_output,
303
+ ]
304
 
305
  gr_title = "MegaDetector v5 + DLClive"
306
  gr_description = "Detect and estimate the pose of animals in camera trap images, using MegaDetector v5a + DeepLabCut-live. \