Action repetitions counting

I'm looking for an idea how to accurately count action repetitions. Average duration of window size let say is 2 sec. Actions length may vary from 1 to 4 sec. So the window may include from 0.5 to 2 repetitions. Hence question, shall I train different models using video clips with a single action with minimal duration for similar groups of actions? Or maybe if model is trained with single action video clips, can I use a confidence param to count one repetition? Any advice will be very appreciated.
Thank you
Answered by Frameworks Engineer in 618769022
It sounds like you have only one action here, and you would like to recognize it and count repetitions. What is the nature of the action when in use? If the action is like this (https://developer.apple.com/videos/play/wwdc2020/10099), where the start of a throw can be found by a trigger, and the throw action itself is not immediately repeated. If this is the case, you may only need one model trained with average action duration, 2 classes (target action class, and a negative class, such as other action).

If the nature of the target action is repeating itself, such as walking, running, jumping rope, etc., and they have varying speeds, this could be harder, even with multiple models, since the action duration is in a continuous range. You may try to find some other assisting ways to count, for example, if a person is jumping rope, first use the model to recognize this action, then use the coordinates on the detected poses, such as feet's coordinates, to determine if the person has touched the ground, and then count.
Accepted Answer
It sounds like you have only one action here, and you would like to recognize it and count repetitions. What is the nature of the action when in use? If the action is like this (https://developer.apple.com/videos/play/wwdc2020/10099), where the start of a throw can be found by a trigger, and the throw action itself is not immediately repeated. If this is the case, you may only need one model trained with average action duration, 2 classes (target action class, and a negative class, such as other action).

If the nature of the target action is repeating itself, such as walking, running, jumping rope, etc., and they have varying speeds, this could be harder, even with multiple models, since the action duration is in a continuous range. You may try to find some other assisting ways to count, for example, if a person is jumping rope, first use the model to recognize this action, then use the coordinates on the detected poses, such as feet's coordinates, to determine if the person has touched the ground, and then count.
Thank you for reply. I was thinking about workouts like squats or pushups. You're right, even their speeds may vary from the beginning to end. I tried to split the exercises to smaller parts with some kind of "splitter" movement in between, but it seems either it requires much more data to train the model properly or this way just won't provide acceptable level of accuracy.
@vasyl128 I have a few videos with various movements. I was hoping to use a csv/json to annotate the movements. Would you be able to share any documentation on how to do this? I would really appreciate it.
Action repetitions counting
 
 
Q