INNER CODE UNIT · Python
boxes
chonyy/ML-auto-baseball-pitching-overlay · src/get_pitch_frames.py:146
boxes=tf.reshape(boxes, (tf.shape(boxes)[0], -1, 1, 4)),
scores=tf.reshape(
pred_conf, (tf.shape(pred_conf)[0], -1, tf.shape(pred_conf)[-1])
),
max_output_size_per_class=50,
max_total_size=50,
iou_threshold=iou,
score_threshold=score_threshold,
)
boxes = boxes.numpy()
scores = scores.numpy()
classes = classes.numpy()
valid_detections = valid_detections.numpy()
offset = 100
accuracyThreshold = 0.95
frame_h, frame_w, _ = frame.shape