# Count specific human postures

**URL:** <https://discuss.roboflow.com/t/count-specific-human-postures/8438>\
**Category:** 🤝  Community Help\
**Tags:** feature-request, convert\
**Created:** [January 30, 2025, 12:06pm UTC](https://discuss.roboflow.com/t/count-specific-human-postures/8438 "2025-01-30T12:06:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fitwist](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/fitwist/32/9357_2.png) [@fitwist](https://discuss.roboflow.com/u/fitwist)\
**Post date:** [January 30, 2025, 12:06pm UTC](https://discuss.roboflow.com/t/count-specific-human-postures/8438/1 "2025-01-30T12:06:41Z")

</div>

I’ve subscribed to Roboflow emails, and there are good tutorials on measuring level of liquid ([https://www.youtube.com/watch?v=FSGMgcrd6uc](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.

 ![Снимок экрана 2025-01-30 в 15.00.49](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/9/9bf1aa70c809e084663ebdde07c3ff98478e11e7.jpeg)

---

<div class="post-metadata">

**Author:** ![Grzegorz](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/grzegorz/32/2877_2.png) [@Grzegorz](https://discuss.roboflow.com/u/Grzegorz)\
**Post date:** [January 31, 2025, 1:56pm UTC](https://discuss.roboflow.com/t/count-specific-human-postures/8438/2 "2025-01-31T13:56:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/1X/bb6edbfa56d0cf2ee603f061e9e09103502cc8cc.png) [@system](https://discuss.roboflow.com/u/system)\
**Post date:** [February 21, 2025, 1:56pm UTC](https://discuss.roboflow.com/t/count-specific-human-postures/8438/3 "2025-02-21T13:56:16Z")

</div>

Closed on February 21, 2025, 1:56pm UTC

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
