Count specific human postures

I’ve subscribed to Roboflow emails, and there are good tutorials on measuring level of liquid (https://www.youtube.com/watch?v=FSGMgcrd6uc) or custom Python logic in the workflow.

My Roboflow app is quite good at determining boxers on a video, but I need to COUNT PUNCHES.

How to inject specific Python code into the workflow so that model could count punches of various classes based on JSON output? My attempts to do it with PyTorch led me to the fact, that the result will be the probability of a specific punch class.

Hi @fitwist,

I understand you already use workflows to process the video of boxing match, and your current logic is capable of detecting punches.
You could use dynamic python block to create instance of sv.Detection with bounding box around the area where punch takes place. You could then add byte track and use it to track such detections. ByteTrack assigns incremental ID to each object it tracks, so as a result in our context it would count individual punches.

Hope this helps,
Grzegorz