Alex Chan commited on
Commit
b7fd8e3
1 Parent(s): 2d5ecf1
Files changed (1) hide show
  1. Code/Inference.py +3 -3
Code/Inference.py CHANGED
@@ -118,7 +118,7 @@ def DLCInference(Crop,dlc_liveObj,CropSize):
118
  return DLCPredict2D
119
 
120
 
121
- def VisualizeAll(frame, box, DLCPredict2D,MeanConfidence,ScaleBBox, imsize):
122
  """Visualize all stuff"""
123
  colourList = [(0,255,255),(255,0 ,255),(128,0,128),(255,192,203),(255, 255, 0),(0, 0 , 255 ),(205,133,63),(0,255,0),(255,0,0)]
124
 
@@ -186,12 +186,12 @@ def Inference(frame,predictor,dlc_liveObj,ScaleBBox=1,Dilate=5,DLCThreshold=0.3)
186
 
187
  DLCPredict2D= DLCInference(BirdCrop,dlc_liveObj,CropSize)
188
 
189
- frame, PlotPoints = VisualizeAll(frame, bbox, DLCPredict2D,MeanConfidence,ScaleBBox,imsize)
190
 
191
  if BirdBBox.shape[0] == 0:
192
  DLCPredict2D= DLCInference(InferFrame,dlc_liveObj,CropSize)
193
  bbox = [0,0,0,0]
194
- frame, PlotPoints = VisualizeAll(frame, bbox, DLCPredict2D,MeanConfidence,ScaleBBox,imsize)
195
 
196
  return frame
197
 
 
118
  return DLCPredict2D
119
 
120
 
121
+ def VisualizeAll(frame, box, DLCPredict2D,ScaleBBox, imsize):
122
  """Visualize all stuff"""
123
  colourList = [(0,255,255),(255,0 ,255),(128,0,128),(255,192,203),(255, 255, 0),(0, 0 , 255 ),(205,133,63),(0,255,0),(255,0,0)]
124
 
 
186
 
187
  DLCPredict2D= DLCInference(BirdCrop,dlc_liveObj,CropSize)
188
 
189
+ frame, PlotPoints = VisualizeAll(frame, bbox, DLCPredict2D,ScaleBBox,imsize)
190
 
191
  if BirdBBox.shape[0] == 0:
192
  DLCPredict2D= DLCInference(InferFrame,dlc_liveObj,CropSize)
193
  bbox = [0,0,0,0]
194
+ frame, PlotPoints = VisualizeAll(frame, bbox, DLCPredict2D,ScaleBBox,imsize)
195
 
196
  return frame
197