<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Asigatchov on Medium]]></title>
        <description><![CDATA[Stories by Asigatchov on Medium]]></description>
        <link>https://medium.com/@asigatchov?source=rss-1238dd6812cc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*zT5tahcWcD9WFQ98</url>
            <title>Stories by Asigatchov on Medium</title>
            <link>https://medium.com/@asigatchov?source=rss-1238dd6812cc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 16:09:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@asigatchov/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Teaching a Model to Recognize Volleyball Actions]]></title>
            <link>https://medium.com/@asigatchov/teaching-a-model-to-recognize-volleyball-actions-b89c0e4cbbfb?source=rss-1238dd6812cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/b89c0e4cbbfb</guid>
            <category><![CDATA[volleyball]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Asigatchov]]></dc:creator>
            <pubDate>Wed, 04 Nov 2026 18:25:02 GMT</pubDate>
            <atom:updated>2026-11-04T18:25:02.398Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Experiments with geometric rules, video classifiers, RAVEL, and a table tennis model adapted for volleyball.</em></p><p>In an earlier article, <a href="https://medium.com/@asigatchov/ravel-vb-%D1%81%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5-%D0%BC%D0%BE%D0%B4%D0%B5%D0%BB%D0%B8-%D1%80%D0%B0%D1%81%D0%BF%D0%BE%D0%B7%D0%BD%D0%B0%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F-%D0%B2%D0%BE%D0%BB%D0%B5%D0%B9%D0%B1%D0%BE%D0%BB%D0%B8%D1%81%D1%82%D0%BE%D0%B2-%D1%81-%D0%BD%D1%83%D0%BB%D1%8F-c8dcead2c076">I wrote about my attempts to build a model that detects players on a volleyball court</a>. The next step was to figure out when a player contacts the ball and what action they perform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8dpbWzy9b_K9Agyqx-0i_w.jpeg" /></figure><h3>Detecting Ball Contacts</h3><p>Once the system could locate players on the court, the next question was how to recognize their actions automatically.</p><p>I started with four classes:</p><ul><li>Serve — serve</li><li>Receive — receive</li><li>Set — set</li><li>Attack — attack</li></ul><p>The terminology turned out to be less useful than I had expected. I had mixed up an action’s role in the rally with the technique used to perform it.</p><p>Receiving a serve, digging an attack, and passing to a teammate serve different purposes. Telling them apart requires context: where the ball came from, what happened before the contact, and where the player sends it next. The first team contact is not necessarily a forearm pass, and the second is not necessarily a set for an attack.</p><p>For now, I use a simplified classification scheme with somewhat loose class names:</p><ul><li><strong>Receive:</strong> playing the ball primarily with a forearm pass.</li><li><strong>Set:</strong> passing the ball primarily with an overhead, two-handed technique.</li><li><strong>Attack:</strong> an attacking hit, usually with one hand above the head.</li><li><strong>Serve:</strong> putting the ball into play with a serve.</li></ul><p>An attack does not have to involve a jump, and a serve does not have to be overhand. Hand position alone is therefore not enough to determine the class. For a serve, for example, the context of how the rally begins is especially important.</p><p>My first approach relied on geometry. Given player bounding boxes and the ball trajectory, I could look for likely contact moments and then infer the action from the ball’s position relative to the player.</p><p>For example, a ball near the top of a player’s bounding box becomes a candidate for an overhead pass. A ball closer to the middle becomes a candidate for a forearm pass. The contact that starts the rally becomes a candidate for a serve.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FBIKigzofHBM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DBIKigzofHBM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FBIKigzofHBM%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d418d346e43c3833f31c8a3db428b777/href">https://medium.com/media/d418d346e43c3833f31c8a3db428b777/href</a></iframe><p>The accuracy leaves a lot to be desired. Much depends on manually chosen thresholds, the quality of the player bounding boxes, and the accuracy of the ball trajectory.</p><p>There is also a more fundamental limitation: a ball being close to a bounding box in a 2D image does not mean physical contact occurred. Players can overlap, and the ball can pass in front of or behind them.</p><p>You tune the parameters for one video, and things look reasonably good. Then you open another video with a different camera angle or player scale, and the rules start making mistakes.</p><h3>Recognizing Actions with Video Models</h3><p>The geometric approach still provides a useful starting point: an estimated contact time and a region of the frame where it may have happened.</p><p>I can crop a short video clip around that moment and feed it into an action recognition model. I tried <strong>MoViNet-A2</strong>, <strong>R(2+1)D-18</strong>, and <strong>X3D-S</strong>.</p><p>These are convolutional video models. They process a sequence of frames, using both visual appearance and changes over time. R(2+1)D separates spatial and temporal processing into consecutive operations.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fi2XyjsbkKPs%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Di2XyjsbkKPs&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fi2XyjsbkKPs%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8bf5af40472d16618317573ca2fe5fb2/href">https://medium.com/media/8bf5af40472d16618317573ca2fe5fb2/href</a></iframe><p>Comparing these models deserves its own investigation — and perhaps another article.</p><p>The models and their pretrained checkpoints have different recommended input resolutions, frame counts, and temporal sampling intervals. Using the same source videos does not automatically make the experimental conditions equivalent.</p><p>If every model receives clips of the same resolution and length, that configuration may suit one model better than the others. It does not guarantee that model will win, though. The result also depends on pretraining, data preparation, and fine-tuning.</p><p>In my experiments, another problem appeared: the action was recognized, but it was not always assigned to the correct player.</p><p>A standard clip classifier answers the question, “What is happening in this clip?” Associating that action with a specific person requires a separate mechanism. If the crop contains several players — an attacker and a blocker, for example — the model may recognize one player’s action while the system assigns it to the other.</p><h3>Extending RAVEL to Detect Contacts and Classify Actions</h3><p>My next hypothesis was straightforward: if the model already processes a sequence of frames and locates the players and the ball, why not train it to predict contacts and action types directly?</p><p>[Image placeholder: Pasted image 20261104160207.png]</p><p>In my experiments, the model learned to detect contacts, but it frequently confused their types. It was particularly fond of predicting attack and set.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F7wqwRCsROYg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D7wqwRCsROYg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F7wqwRCsROYg%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/79107ebb1cf87d218c6190c28a27474d/href">https://medium.com/media/79107ebb1cf87d218c6190c28a27474d/href</a></iframe><p>At this stage, I decided to narrow the task. Instead of asking the model to do everything at once, I kept contact detection and dropped action classification for now.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F1ha7WU9sH2k%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D1ha7WU9sH2k&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F1ha7WU9sH2k%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a45d5cdd90f7885e89c3a73ac3890757/href">https://medium.com/media/a45d5cdd90f7885e89c3a73ac3890757/href</a></iframe><h3>Adapting TTNet for Volleyball</h3><p>GitHub’s recommendations led me to <a href="https://github.com/maudzung/TTNet-Real-time-Analysis-System-for-Table-Tennis-Pytorch">an unofficial PyTorch implementation of TTNet</a>.</p><p>TTNet was originally developed for table tennis analysis. It combines ball detection, event spotting — table bounces and net contacts — and semantic segmentation of the scene.</p><p>Ball detection happens in two stages:</p><ul><li><strong>Global stage:</strong> the model processes downscaled frames to estimate the ball’s position.</li><li><strong>Local stage:</strong> a region around that estimate is cropped from the original-resolution frames, allowing the model to refine the ball’s position.</li></ul><p>Features from the local branch are also used to detect events. The network therefore has access to both the full-frame view and a more detailed view of the area around the ball.</p><p>That gave me an idea: why not adapt this approach to volleyball and train the model to detect player contacts instead of table bounces?</p><p>Of course, this is a different task. Volleyball has more players, more frequent occlusions, and contacts between the ball and a player’s hands that can be difficult to see. Detecting the contact time also does not, by itself, solve action classification or identify the player responsible.</p><p>Eventually, I could try adding floor contacts as well, but I do not currently have the annotations needed to train for them.</p><p>Using what I call “vibe ML,” I got a model that started predicting volleyball actions on the fifth attempt.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FhFga0eiUjJA%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DhFga0eiUjJA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FhFga0eiUjJA%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e7c4cafe3eaa2d449de345984815fd6d/href">https://medium.com/media/e7c4cafe3eaa2d449de345984815fd6d/href</a></iframe><p>For now, this is an experimental result. A single demo video cannot tell us which approach is more accurate. That requires a shared, independent test set.</p><h3>The Data Problem</h3><p>Every new task needs its own annotations.</p><p>For ball and player detection, for example, I annotated around 30,000 frames from 20 different videos. But player bounding boxes and ball coordinates do not tell us when a contact occurred or what action the player performed.</p><p>Training and evaluating action recognition requires separate event annotations: the contact time, the action type, and the player who performed it.</p><p>My current set of annotated actions looks like this:</p><p>Action typeExamplesGames representedReceive19332Attack9432Serve8431Set4222<strong>Total413</strong> —</p><p>The classes are imbalanced: there are almost five times as many receive examples as set examples. This needs to be accounted for during both training and evaluation.</p><p>My next target is to collect 300 examples of each action for training, plus another 100 per class for independent testing.</p><p>Across four classes, that comes to:</p><ul><li>1,200 training events</li><li>400 test events</li><li><strong>1,600 events in total</strong></li></ul><p>This is a starting point for the next comparison, not a guarantee of sufficient model quality. I will also need a validation set for tuning parameters and selecting models, which must be planned separately.</p><p>The data should be split by source match or recording. Adjacent or overlapping clips from the same episode must not appear in both training and test sets.</p><p>I also need clips without contacts. Otherwise, I can measure how well a model classifies events that have already been located, but I cannot tell how many false contacts it will predict when processing a full video.</p><p>A shared test set will let me compare geometric rules, standalone video classifiers, and my own models. I want to evaluate three things separately: whether the system found the contact, whether it classified the action correctly, and whether it assigned the action to the right player.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FD2D0VwrobbM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DD2D0VwrobbM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FD2D0VwrobbM%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa9aecfddf9d5fa7cdd6db1435c75eab/href">https://medium.com/media/fa9aecfddf9d5fa7cdd6db1435c75eab/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b89c0e4cbbfb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RAVEL-VB: Building a Volleyball Player Detection Model from Scratch]]></title>
            <link>https://medium.com/@asigatchov/ravel-vb-%D1%81%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5-%D0%BC%D0%BE%D0%B4%D0%B5%D0%BB%D0%B8-%D1%80%D0%B0%D1%81%D0%BF%D0%BE%D0%B7%D0%BD%D0%B0%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F-%D0%B2%D0%BE%D0%BB%D0%B5%D0%B9%D0%B1%D0%BE%D0%BB%D0%B8%D1%81%D1%82%D0%BE%D0%B2-%D1%81-%D0%BD%D1%83%D0%BB%D1%8F-c8dcead2c076?source=rss-1238dd6812cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8dcead2c076</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[volleyball]]></category>
            <dc:creator><![CDATA[Asigatchov]]></dc:creator>
            <pubDate>Fri, 31 Jul 2026 04:45:52 GMT</pubDate>
            <atom:updated>2026-07-31T04:47:10.259Z</atom:updated>
            <content:encoded><![CDATA[<p>It all started when I came across an article on Habr about TAPe — Theory of Active Perception. The article made bold claims and offered an intriguing description of the approach, but I was unable to try the model in practice.</p><p><a href="https://github.com/asigatchov/RAVEL-VB-beachvolleyball-tracking"><strong>RAVEL-VB Beach Volleyball Tracking</strong></a></p><p>I collected the key ideas behind TAPe and asked ChatGPT the following:</p><blockquote><em>“I am a student, and for my graduation project I want to implement a model based on the Theory of Active Perception. The model should detect where players are located and identify the actions they perform: serving, receiving, setting, or attacking.”</em></blockquote><p>I also explained that I had video recordings and wanted to use nine-frame clips to provide temporal context.</p><p>Why nine frames? I had previously modified TrackNet to track a volleyball across nine consecutive frames, so I decided to follow a similar approach to reduce computational costs.</p><h3>Early Iterations</h3><p>The first version of the model used a query-based approach to detect both players and the ball in a video clip.</p><h3>How It Works</h3><p>The model receives a fixed clip of nine frames in the format [B, T, C, H, W]. Each frame is resized to 512 × 288 pixels.</p><p>TinyBackbone extracts features at three FPN pyramid levels: 1/4, 1/8, and 1/16 of the original resolution.</p><p>To detect players, the model uses 20 learnable query slots with initial spatial anchors. The decoder sequentially applies:</p><ul><li>self-attention between queries;</li><li>cross-attention over visual features;</li><li>temporal attention across frames.</li></ul><p>For each query, the model predicts:</p><ul><li>the object class — player or background;</li><li>a bounding box;</li><li>an embedding used to match the same player across frames.</li></ul><p>The ball is detected by a separate grid-based head. For each frame, the model predicts a confidence map and an object offset within the most probable grid cell.</p><p>After inference, a confidence threshold and non-maximum suppression are applied to the player bounding boxes. For the ball, the cell with the highest confidence score is selected.</p><p>On paper, the approach looked elegant. The next step was to find suitable data, train the model, and see how well the theory worked in practice.</p><p>At the first stage, I decided to reduce the scope and focus only on player detection. The plan was to first achieve reliable player detection, then expand the temporal context and add action recognition.</p><p>The main challenge when training models of this kind is the availability of high-quality annotated datasets.</p><p>I ran my first experiments on a padel dataset consisting of two twenty-minute videos with frame-by-frame annotations.</p><p>After the first training runs, the model did learn to detect padel players, but its accuracy was still insufficient. It often predicted bounding boxes in empty regions where no player was present in the current frame.</p><p>From a statistical point of view, however, these predictions were understandable: players often appeared in those regions in adjacent frames or in other segments of the videos.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*P6tTJ6e0rXzsM_mK.png" /></figure><p>I spent quite a long time discussing the possible causes of these false detections with ChatGPT. Only much later did I accidentally notice that, in the validation visualizations, the predicted boxes did not match the actual player positions at all.</p><p>The problem turned out to be the annotations. One of the matches contained a close-up sequence, but the corresponding frames had been skipped during annotation. As a result, all subsequent annotations became shifted relative to the video. Nearly half of the dataset was therefore incorrectly labeled.</p><h3>A Beach Volleyball Dataset</h3><p>Why beach volleyball? It is summer, and we regularly play on the sand. I record our matches so that I can later review my own performance from an outside perspective.</p><p>There are only four players on the court, which makes these videos easier to annotate. In the future, I would also like to automatically generate statistics for my own matches: clips containing only active rallies, without pauses, the number of touches, rally duration, and other metrics.</p><p>For the initial dataset annotation, I used the large YOLO11l model. However, it quickly became clear that automatically generated annotations for my videos still required manual correction.</p><p>The errors were particularly noticeable during attacks and blocks. When a player jumps, the model sometimes cuts the bounding box off at the head or fails to include the raised arms of the attacker or blocker.</p><p>While working on the dataset, I also realized that my recordings were too uniform: the same court, similar lighting conditions, and an almost unchanged camera position. To increase the diversity of the data, I added videos featuring professional players.</p><h3>Feedback from an LLM</h3><p>At this point, we have a dataset for experimentation and an LLM-generated model architecture that can be trained.</p><p>In an ideal world, this would be enough to produce a working detector. In reality, the model does detect something, but often in the wrong place. At other times, it fails to detect players who are clearly visible.</p><p>So we take the results and write:</p><blockquote><em>“Dear ChatGPT, look at this nonsense…”</em></blockquote><p>The LLM replies:</p><blockquote><em>“You are absolutely right: this is a predictable failure caused by the architecture of your network…”</em></blockquote><p>This is usually followed by a confident explanation of exactly which model component is malfunctioning, why the error was inevitable, and what changes need to be made to the architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*S9CEbZ979fsS4dG3.png" /></figure><p>After each architectural change, the model had to be retrained on my dataset of 21,000 frames. A single epoch took 6–7 minutes, while a complete training run on an RTX 3060 with 12 GB of VRAM took approximately 8–10 hours.</p><p>After more than twenty iterations, we ended up with a model that almost works. It can already detect players with reasonable confidence, but several issues remain: the bounding boxes tend to jitter, and detections are occasionally lost on individual frames.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qZ_oSySF0_mtZyOeHEabAQ.gif" /></figure><p>After every improvement or architectural change, it is important to remember to commit the code to Git. Not every modification actually makes the model better, so there should always be a way to return to the latest successful version.</p><h3>Changing the Architecture</h3><p>After numerous “correct fixes” suggested by the LLM, the model gradually accumulated a large number of workarounds, additional parameters, and mechanisms specifically tailored to player detection. Despite this growing complexity, prediction quality improved very little.</p><p>At some point, I decided to stop endlessly modifying the existing implementation. Instead, I asked the LLM to redesign the architecture from scratch and address the bottlenecks we had identified.</p><p>The main lesson from this stage was that it is important to recognize a dead end early enough and move on to a new experiment rather than continuing to complicate an unsuccessful solution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*Xp8SGLgKGoOlnUEu2qBIEQ.png" /></figure><p>The first architecture had already reached a satisfactory level of performance, but further improvements became increasingly difficult and had almost no effect on prediction quality. The new version was therefore not merely another incremental update, but a separate architectural experiment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P6ymLimotrl-zktHHTCo-A.gif" /></figure><p><strong>RAVEL-VB Model Architecture</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YwMdDzi_V6_Cg74J.png" /></figure><p>You can run the model yourself using the repository:</p><p><a href="https://github.com/asigatchov/RAVEL-VB-beachvolleyball-tracking"><strong>RAVEL-VB Beach Volleyball Tracking</strong></a></p><p>The model consists of two independent branches:</p><ul><li>the first branch detects players;</li><li>the second branch detects the ball and is based on vballnet_grid_v1a.</li></ul><h3>Performance Benchmarks</h3><p>As a baseline, I ran YOLO11n with OpenVINO and achieved 19.16 FPS.</p><p>Against this baseline, the results of my own model looked quite promising:</p><ul><li>OpenVINO was used for CPU inference;</li><li>PyTorch with CUDA was used for GPU inference.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*un6mbS4LdZUpZ0wnjVtQFg.png" /></figure><p>While preparing this article, I decided to compare the model’s performance and accuracy with a fine-tuned YOLO26n model.</p><p>The result was unexpected: YOLO26n-VB achieved 43.87 FPS with OpenVINO.</p><p>The frames in my dataset have a resolution of 512 × 288 pixels. This made it possible to run the YOLO models faster than with their standard 640 × 640 input resolution.</p><p>Being almost twice as slow forced me to take a closer look at the performance problem. The model that was supposed to become a “YOLO killer” turned out to be significantly slower than YOLO itself.</p><p>Profiling showed that the backbone accounts for more than half of the total execution time. Another 27% is spent on the ball-detection branch, while the proposal head accounts for 15.3%.</p><p>The main conclusion is clear: the backbone should be optimized first, because it is the primary bottleneck in the entire architecture.</p><h3>Architectural Optimizations in RAVEL-VB-002/003 Compared with RAVEL-VB-001</h3><p>The standard model configuration is used as the baseline: an input resolution of 512 × 288 pixels, a feature width of 128 channels, 32 queries, and dense proposal generation on the P4 feature map.</p><h3>1. Reducing the Feature Width</h3><p>In RAVEL-VB-001, the hidden representation uses 128 channels, while RAVEL-VB-002 and RAVEL-VB-003 use 64 channels by default.</p><p>Reducing the feature width lowers both the computational cost and the amount of intermediate data transferred between model layers.</p><h3>2. C3k2/CSP Backbone Instead of Full-Channel Blocks</h3><p>The backbone in the optimized versions is built around C3k2 blocks that use a CSP-like feature-flow split:</p><ul><li>the input features are projected into two lower-width branches;</li><li>computationally expensive convolutions are applied to only one branch;</li><li>intermediate features are concatenated;</li><li>the final feature map is produced through a compact projection.</li></ul><p>With an expansion ratio of 0.5, the main convolutions operate on approximately half the original number of channels. Residual connections inside the C3k blocks help preserve training stability.</p><h3>Backbone Parameter Count</h3><p>Model Number of Parameters<br>RAVEL-VB-001 — <strong>1,209,328</strong><br>RAVEL-VB-002 — <strong>404,848</strong><br>RAVEL-VB-003 — <strong>375,792</strong></p><p>As a result, the RAVEL-VB-002 backbone contains approximately three times fewer parameters than the RAVEL-VB-001 backbone. RAVEL-VB-003 reduces the parameter count even further.</p><p>RAVEL-VB-002 preserves a more informative P4-level representation, while RAVEL-VB-003 applies a more aggressive “compute on demand” strategy. A dense high-resolution feature map is used only for the initial object search. Most of the subsequent processing is then moved to sparse queries and lower-resolution features.</p><h3>Not All FPS Measurements Are the Same</h3><p>Model performance can be measured in different ways.</p><p>One approach is to measure the maximum number of inputs the model can process per second. This type of benchmark is usually performed on preloaded tensors and reflects pure inference speed, without including video reading or decoding.</p><p>Another approach is to measure how quickly the model processes an entire video.</p><p>For practical use, the more important metric is the speed at which predictions are produced from a video stream. The final benchmark therefore includes:</p><ul><li>frame reading and decoding;</li><li>preprocessing;</li><li>model inference;</li><li>prediction postprocessing.</li></ul><p>This metric is more accurately described as end-to-end pipeline performance, or <strong>pipeline FPS</strong>.</p><h3>Test Video</h3><p>The benchmark used a video with the following properties:</p><pre>Duration: 00:00:40.01<br>Start: 0.000000<br>Bitrate: 1119 kb/s<br>Codec: H.264 High<br>Pixel format: yuv420p<br>Color space: BT.709<br>Resolution: 1280 × 720<br>Video bitrate: 982 kb/s<br>Frame rate: 29.97 FPS</pre><p>To make the results reproducible, the benchmarks were run on a VPS and a dedicated GPU.</p><p>This made it possible to compare model versions under the same conditions while reducing the impact of background workloads, CPU differences, system configuration, and storage performance.</p><h3>Model Accuracy Comparison</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lol53C7HJQm5eJOevSr9dQ.png" /></figure><p><strong>ravel-vb-001:</strong> object class, bounding box, embedding, head and foot keypoints, visibility, court points, and association predictions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8dcead2c076" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[YOLOv11 and RF-DETR for Video Object Detection Adding Temporal Features with Grayscale Superframe…]]></title>
            <link>https://medium.com/@asigatchov/yolov11-and-rf-detr-for-video-object-detection-adding-temporal-features-with-grayscale-superframe-7972cac7c4f7?source=rss-1238dd6812cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/7972cac7c4f7</guid>
            <category><![CDATA[object-detection]]></category>
            <category><![CDATA[volleyball]]></category>
            <category><![CDATA[action]]></category>
            <category><![CDATA[yolov11]]></category>
            <dc:creator><![CDATA[Asigatchov]]></dc:creator>
            <pubDate>Thu, 26 Mar 2026 21:29:24 GMT</pubDate>
            <atom:updated>2026-03-26T21:29:24.585Z</atom:updated>
            <content:encoded><![CDATA[<h3>YOLOv11 and RF-DETR for Video Object Detection Adding Temporal Features with Grayscale Superframe (3-Frame RGB Stacking)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zslCAFa61o_-Q3BQFtEjxg.png" /></figure><h3>Adding Time Awareness to Image Detectors for Video: A Superframe Approach for Volleyball Action Annotation</h3><p>Object detection has become one of the most accessible areas of computer vision. If you search for <em>object detection</em>, you will almost immediately encounter the YOLO family of models in many versions. These models are popular for a reason: they are fast, practical, and relatively easy to use. Models such as <strong>YOLO</strong> and <strong>RF-DETR</strong> work extremely well when the task is framed as image-based detection: you provide a single image as input, and the model returns predicted objects.</p><p>That workflow is simple and effective. But video is not just a collection of independent images.</p><h3>Why video is different from images</h3><p>When we apply models like <strong>YOLOv5</strong>, <strong>YOLOv8</strong>, <strong>YOLOv11</strong>, or <strong>RF-DETR</strong> to video, the usual approach is to process each frame separately, as if it were an isolated picture.</p><p>This creates an important limitation.</p><p>A video frame has a temporal relationship with its neighboring frames. Motion, direction, acceleration, and interaction all emerge through time. When we treat frames independently, we throw away that information and later try to reconstruct it in post-processing. In many cases, especially in sports analytics, this is far from ideal.</p><p>I wanted to test a simpler idea: instead of redesigning the detector itself, could I inject temporal information directly into the model input?</p><h3>The superframe idea</h3><p>To detect moving objects without changing the architecture of YOLO or RF-DETR, I built what I call a <strong>superframe</strong>.</p><p>A <strong>superframe</strong> is a single input image created from three neighboring video frames.</p><p>The idea is straightforward:</p><ul><li>convert each frame to grayscale,</li><li>take three consecutive frames,</li><li>place them into the three RGB channels of one image.</li></ul><p>So instead of using RGB as color channels, I use the channels to encode time.</p><p>For a <strong>30 FPS</strong> video, this gives the detector a short temporal window of about <strong>0.12 seconds</strong>:</p><ul><li><strong>R</strong> = frame -1</li><li><strong>G</strong> = current frame</li><li><strong>B</strong> = frame +1</li></ul><p>If the temporal step is increased to <strong>±2</strong>, the covered interval becomes approximately <strong>0.2 seconds</strong>.</p><p>This means the model still receives a standard 3-channel image, but that image now contains motion information.</p><h3>Why this matters</h3><p>This approach sacrifices color information, but in return it preserves a compact representation of motion. For many sports tasks, especially with stationary cameras, color is less important than temporal consistency and movement cues.</p><p>The superframe acts like a lightweight temporal encoding method. It allows us to reuse standard image detectors while giving them access to short-term dynamics.</p><p>In practice, this creates a useful effect: moving objects become visually emphasized, while static background elements remain more stable across channels.</p><h3>First experiment: ball detection</h3><p>I first applied this method to <strong>volleyball ball detection</strong> in footage from a stationary camera.</p><p>This turned out to be a good test case because the volleyball is a small object, often hard to detect, and highly dependent on motion cues.</p><p>The result was promising: the superframe representation improved detection quality for small moving objects, especially the ball.</p><p>That encouraged me to take the same idea one step further.</p><h3>Extending the approach to game action detection</h3><p>After the ball detection experiment, I wanted to see whether the same temporal encoding could help with a more complex task: <strong>detecting volleyball actions</strong>.</p><p>A review of existing work shows that YOLO-based models are widely used in volleyball-related computer vision tasks. They are often applied to detect game elements and events such as:</p><ul><li>serve,</li><li>receive,</li><li>set,</li><li>attack,</li><li>block.</li></ul><p>However, using a non-standard temporal input format creates a practical challenge: there are no ready-made annotation tools designed for this type of data.</p><h3>Building an annotation tool</h3><p>To solve the annotation problem, we created a lightweight tool called <strong>Volleyball Action Annotator (VAA)</strong>.</p><p><strong>Volleyball Action Annotator (VAA):</strong><br> <a href="https://github.com/asigatchov/VAA">https://github.com/asigatchov/VAA</a></p><p>The tool was designed specifically for marking volleyball actions in both standard frame view and superframe-based view.</p><p>This made it possible to define a consistent annotation process for action detection experiments.</p><h3>How we annotate volleyball actions</h3><p>Our annotation method is centered around the moment of <strong>ball contact</strong>.</p><p>For each game action, we usually work with <strong>3 to 4 frames</strong>.</p><p>The key frame is the frame where the ball contact happens. Starting from that point, we mark:</p><ul><li>the frame before contact,</li><li>the contact frame,</li><li>the frame after contact.</li></ul><p>In normal <strong>RGB viewing mode</strong>, this allows us to inspect the action in a familiar way.</p><p>In <strong>SUPERFRAME</strong> mode, each of those moments also includes its neighboring frames within a ±1 frame window. As a result, the annotation captures not only the contact moment itself, but also the short temporal context around it.</p><p>This overlay of neighboring frames creates something similar to a <strong>pseudo-attention map for motion</strong>. Moving objects stand out against the static background because their position changes across channels, while the background remains comparatively stable.</p><p>For sports footage from fixed cameras, this turns out to be especially useful.</p><h3>Why the dataset had to be built from scratch</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hQxN_os5VFqtHXSrMAc4pA.png" /></figure><p>Because this annotation format is unusual, existing datasets were not sufficient for the experiment.</p><p>The dataset had to be created from scratch, specifically for the superframe-based workflow. That included both defining the annotation logic and building tooling to support it.</p><p>This is one of the main disadvantages of the approach: while the modeling idea is simple, the data preparation pipeline is not standard.</p><p>Still, the tradeoff may be worth it if the goal is to improve action detection without moving to a much heavier video model architecture.</p><h3>Early training results</h3><p>After annotating the first <strong>50 game actions</strong>, we trained <strong>RT-DETR</strong> for <strong>30 epochs</strong>.</p><p>Even with this relatively small initial dataset, the first model was already useful. It helped accelerate the second round of annotation by providing initial predictions that could be corrected by a human annotator.</p><p>This creates a practical feedback loop:</p><ol><li>annotate a small seed dataset,</li><li>train an initial model,</li><li>use the model to speed up the next round of labeling,</li><li>repeat.</li></ol><p>For experimental sports datasets, this kind of iterative workflow can significantly reduce annotation cost.</p><h3>Final thoughts</h3><p>The main idea behind this work is simple: instead of redesigning an object detector for video, we can try to encode time directly into the input image.</p><p>The <strong>superframe</strong> approach is a lightweight way to introduce temporal information into standard image-based detectors such as YOLO or RF-DETR. In volleyball footage from stationary cameras, it has already shown useful results for both <strong>small object detection</strong> and <strong>action annotation</strong>.</p><p>There is still a lot to explore: better temporal spacing, larger datasets, more action classes, and comparisons against dedicated video architectures. But even at this stage, the method looks promising as a practical middle ground between single-frame detection and full video modeling.</p><p><strong>To be continued.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7972cac7c4f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building vball-net a Lightweight Volleyball Ball Tracker: 200+ FPS on CPU]]></title>
            <link>https://medium.com/@asigatchov/building-vball-net-a-lightweight-volleyball-ball-tracker-200-fps-on-cpu-20f5724c0c18?source=rss-1238dd6812cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/20f5724c0c18</guid>
            <category><![CDATA[tracking]]></category>
            <category><![CDATA[vball-net]]></category>
            <category><![CDATA[volleyball]]></category>
            <category><![CDATA[yolov8]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[Asigatchov]]></dc:creator>
            <pubDate>Mon, 09 Mar 2026 19:36:58 GMT</pubDate>
            <atom:updated>2026-03-09T19:36:58.410Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Building a Lightweight Volleyball Ball Tracker: 200+ FPS on CPU (OpenVINO + Intel i5–10400F)</strong></p><p><em>From amateur volleyball hobby to real-time ball tracking — a personal journey of optimizing a deep learning model for tiny, fast objects</em></p><p>As an amateur volleyball player and IT engineer, I’ve always been fascinated by how professional teams use video analysis tools to break down every serve, set, and spike. Services like <strong>Balltime</strong> (from Hudl) offer incredible detailed breakdowns — trajectory overlays, rally statistics, serve side detection — but they remain out of reach for local clubs and hobbyists.</p><p>In late 2024, I stumbled upon a Balltime demo video on Instagram. That moment sparked a question: <em>Can I build something similar myself — at least the core part: reliable, real-time volleyball ball detection and tracking — and make it run fast even on ordinary hardware?</em></p><h3>Why standard object detectors struggle with volleyball balls</h3><p>A volleyball in a 1920×1080 broadcast or amateur Action Cam footage often shrinks to <strong>5×5 pixels</strong> (or even smaller) on distant shots. Classical single-frame detectors like <strong>YOLOv5/v8/v11</strong> + ByteTrack work reasonably on medium-sized objects, but they degrade heavily on such tiny, blurry, fast-moving targets.</p><p>Alternative ideas I found:</p><ul><li>One interesting Medium article from 2021 described volleyball <strong>serve detection</strong> using trajectory classification (not direct ball detection). They extracted features like speed, size, parabola shape → fed them into <strong>Random Forest</strong> classifier (sklearn) achieving ~<strong>70–80%</strong> accuracy on serve/pass/set/attack/toss/invalid categories after careful feature engineering and dataset filtering. Dataset was manually labeled from YouTube videos. Useful for high-level rally parsing, but not for precise per-frame ball coordinates.</li><li><strong>SAHI</strong> (Slicing Aided Hyper Inference) — tiling the frame and merging detections — helps YOLO see small objects better, but still adds latency.</li><li>Then I discovered <strong>TrackNet</strong> family — originally designed for <strong>tennis ball tracking</strong> (2019 paper, arXiv:1907.03698, 177+ citations), later adapted to badminton shuttlecocks and other racquet sports. TrackNet uses U-Net-like architecture and takes <strong>multiple consecutive frames</strong> (usually 3) as input → predicts <strong>heatmap(s)</strong> of ball location → exploits temporal context to handle blur, occlusion, and invisibility.</li></ul><p>Key advantage over YOLO: <strong>temporal information</strong>. YOLO treats each frame independently; TrackNet “remembers” motion from previous frames.</p><h3>Starting point: TrackNetV4 (TensorFlow 2)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qQSjkZ9e0nd-_ikNpPot9A.jpeg" /></figure><p>I began experiments with <strong>TrackNetV4</strong> — an improved version that fuses visual features with motion attention maps, showing better robustness to occlusions compared to TrackNetV2/V3.</p><p>But two big problems appeared immediately:</p><ol><li><strong>Dataset mismatch</strong> Pre-trained models were tuned on professional tennis/badminton broadcast videos (1280×720, 30 fps, clean angles). My amateur Action Cam recordings (different resolution, fisheye distortion, worse lighting) gave terrible results. Domain gap is brutal in sports tracking.</li><li><strong>Training was painfully slow</strong> On RTX 3060, one epoch over my ~20,000 labeled frames took <strong>~50 minutes</strong>. Not feasible for fast iteration.</li></ol><p>So I decided to create my own dataset:</p><ul><li>Collected amateur volleyball videos</li><li>Spent a week manually annotating ball positions frame-by-frame</li><li>Built a simple Python + OpenCV labeling tool → <a href="https://github.com/asigatchov/vball-net-pytorch/blob/main/src/utils/imgLabel.py">https://github.com/asigatchov/vball-net-pytorch/blob/main/src/utils/imgLabel.py</a></li><li>Public dataset link: <a href="https://volleyball-orel.ru/static/system/docs/data_20250711_2330.tgz">https://volleyball-orel.ru/static/system/docs/data_20250711_2330.tgz</a></li></ul><h3>From TrackNet → vball-net: optimizations for speed</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rBX21YWjQ--WNGZ1xIjtJQ.jpeg" /></figure><p>First inference runs of TrackNetV4 were much slower than papers claimed — especially on CPU.</p><p>Original TrackNetV4 behavior:</p><ul><li>Input: <strong>3 RGB frames</strong> → 9 channels</li><li>Output: <strong>3 heatmaps</strong> (one per input frame)</li></ul><p>Goal: <strong>maximum FPS on CPU</strong> (target: 100+ FPS on mid-range Intel i5), while keeping acceptable accuracy for amateur videos.</p><p>Key hacks that got me there:</p><ol><li><strong>Grayscale + stack more frames</strong> Color almost useless for ball detection (volleyball is mostly white/yellow). → Convert everything to grayscale → Feed <strong>9 grayscale frames</strong> (still 9 channels) → Change output head to <strong>9 heatmaps</strong> (one per frame) → Network processes 9 independent predictions at once instead of 3.</li><li><strong>Non-sliding-window inference — the ×9 speedup</strong> Classic TrackNet uses sliding window of 3 (or more) frames → each output frame requires re-processing overlapping history → lots of redundant computation. → Switched to <strong>non-overlapping batches</strong>: feed fresh 9 frames → get 9 heatmaps → take the central one as main prediction → move forward by 9 frames. → Result: each frame processed <strong>exactly once</strong> → theoretical ×9 speedup (in practice ~6–8× due to overhead).</li><li><strong>Model surgery</strong> Experimentally pruned depth/width of the U-Net backbone → found sweet spots between accuracy drop and speed gain.</li><li><strong>PyTorch rewrite → ONNX → OpenVINO</strong></li></ol><ul><li>Rewrote in PyTorch for flexibility: <a href="https://github.com/asigatchov/vball-net-pytorch">https://github.com/asigatchov/vball-net-pytorch</a></li><li>Exported to ONNX</li><li>Optimized + converted to OpenVINO IR for Intel CPU</li><li>Inference code: <a href="https://github.com/asigatchov/fast-volleyball-tracking-inference">https://github.com/asigatchov/fast-volleyball-tracking-inference</a></li></ul><h3>Final results</h3><p>On <strong>Intel i5–10400F</strong> (6 cores, no GPU):</p><ul><li><strong>200+ FPS</strong> in pure inference (some model variants even higher)</li><li>Stable <strong>~100–150 FPS</strong> with video decoding + post-processing + CSV output</li><li>Several model variants released: VballNetV1, V2, grayscale_seq9 etc. (resolutions like 288×512)</li><li>Live demo running in browser: <a href="https://demo.vb-ai.ru/">https://demo.vb-ai.ru/</a></li><li>Hugging Face space mirror: <a href="https://huggingface.co/spaces/asigatchov/volleyball-tracking">https://huggingface.co/spaces/asigatchov/volleyball-tracking</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20f5724c0c18" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Volleyball Court Detection Using U-Net Network]]></title>
            <link>https://medium.com/@asigatchov/volleyball-court-detection-using-u-net-network-29dc4f9f658b?source=rss-1238dd6812cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/29dc4f9f658b</guid>
            <category><![CDATA[pose-estimation]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[volleyball-analysis]]></category>
            <category><![CDATA[court-keypoints]]></category>
            <category><![CDATA[tracknet]]></category>
            <dc:creator><![CDATA[Asigatchov]]></dc:creator>
            <pubDate>Sun, 11 Jan 2026 21:13:47 GMT</pubDate>
            <atom:updated>2026-01-11T21:17:08.298Z</atom:updated>
            <content:encoded><![CDATA[<p>For automatic analysis of volleyball game videos, it is desirable to automatically detect key points of the volleyball court and the net.</p><p>Alternative — manual court annotation for each video before starting analysis.</p><p>While studying existing solutions, I came across the TennisCourtDetector repository.<br>A 2022 project — the heyday of using U-Net architecture for sports detection tasks.<br>A small, straightforward project with a link to a dataset of over 8000 annotated samples and pretrained weights — which makes it perfect for running your own experiments.</p><p>The original article can be found at <a href="https://recdev.ru/blog/5/">https://recdev.ru/blog/5/</a></p><h4>Step one — running tennis court detector<br>Cloning the repository</h4><p>Since the last commit was more than 3 years ago (2023), the Python version and dependencies need to be updated.<br>The small codebase size makes this relatively painless using vibe coding.</p><p>Link to the fork with fixed dependencies (the original repository author has been inactive for a long time):</p><blockquote>git clone <a href="https://github.com/asigatchov/TennisCourtDetector.git">https://github.com/asigatchov/TennisCourtDetector.git</a></blockquote><h3>TrackNet — for court keypoints</h3><p>2023 was the peak year for works on detecting small sports objects (tennis ball, shuttlecock in badminton). I assume that riding this wave, the author implemented the possibility of detecting tennis court keypoints — 14 points.</p><p>Classic TrackNet model, where 3 consecutive frames of size 640×360 are fed in for small tennis ball detection — the output is a heatmap of the middle frame (there might be implementations where all 3 frames are used, with higher precision on the central one).</p><h3>Dataset — key to success</h3><p>The author provides links to a dataset of 8000 images with JSON descriptions of the annotated court points coordinates. A semi-automatic method was used to create the dataset: Line detection (using Hough transform).</p><p>Source — [<a href="https://medium.com/@kosolapov.aetp/tennis-analysis-using-deep-learning-and-machine-learning-a5a74db7e2ee">Tennis Analysis using deep learning</a>](<a href="http://Tennis Analysis using deep learning">https://medium.com/@kosolapov.aetp/tennis-analysis-using-deep-learning-and-machine-learning-a5a74db7e2ee</a>)</p><h3>Study and experiments</h3><p>After running the code, I found out that the inference speed is ~1 fps on CPU and 23–36 fps on GPU (5070).</p><p>To speed things up, the decision was made to reduce the number of network parameters by decreasing the image size to 512×288 (inspired by modern TrackNetV2/V4 models) and converting frames to grayscale (1 channel instead of 3).</p><p>Training on cropped data made the training loop faster and slightly improved inference speed as well.</p><h3>Dataset format and why I chose COCO</h3><p>Good training results require well-annotated data. The key point — <strong>really well annotated</strong>.</p><p>After studying the tennis court annotation format, I realized it uses a custom format. This means you either have to: — annotate everything in one of the popular formats first and then convert, or — modify the data loader to work with COCO format and convert the custom tennis court annotations to COCO.</p><p>COCO format is supported by popular annotation tools. One of them is Roboflow. Roboflow has a monthly credit limit that covers hobbyist needs quite well.</p><p>I wrote <em>CocoCourtDataset</em> (data loader) and a converter <em>data_train.json</em> → <em>_annotation.coco.json</em>. The test training cycle showed that everything works correctly.</p><h3>Volleyball court / field annotation</h3><p>Since the ultimate goal is to work with videos from my amateur cameras, publicly available datasets are not suitable. Action cameras have fisheye distortion, and TV broadcast annotations won’t work properly.</p><p>My first attempt at annotation was done in Roboflow. The process turned out to be quite time-consuming, and after annotating 50 frames I realized I had done it incorrectly — I hadn’t properly understood skeleton and point rendering.</p><p>As the classic saying goes — real heroes always take the detour.</p><p>Using OpenCV, I wrote my own minimal annotation tool. Initially, I planned to annotate 10 court points (4 corners + 6 intersections of sidelines).</p><p>Then I thought: why don’t they annotate the net in tennis? — and added the upper net edges near the antennas.</p><p>During the Roboflow annotation process, I realized that marking 8 points is noticeably faster than 12, so I reduced the number of 3-meter line points.</p><p>For testing, I took 15 videos recorded from the baseline. I implemented an automatic point copying mechanism.</p><p>The camera is static → you can annotate the first frame and propagate the annotations forward. Added button <strong>**A**</strong> — auto-advance video by 50 frames and save annotations. Buttons <strong>**N** </strong>and <strong>**P**</strong> — cycle between points.</p><p>[<a href="https://github.com/asigatchov/Court-Keypoint-Detection">Court-Keypoint-Detector</a>](https://github.com/asigatchov/Court-Keypoint-Detection)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TOmZwq_o2gIKKdPts3r5Hg.jpeg" /><figcaption><a href="https://recdev.ru/media/photos/cv_annotatot_tools.jpg">cv_annotatot_tools</a></figcaption></figure><h3>yolo11m-pose — for volleyball court keypoint detection</h3><p>Having the data allows experimentation with different network architectures.</p><p>For comparison, I decided to try fine-tuning YOLOv11-pose. YOLOv11 from <a href="https://www.ultralytics.com/">https://www.ultralytics.com/</a> allows very fast and straightforward fine-tuning for your specific task.</p><p>With a small amount of data, YOLO tries to compensate through strong data augmentation (artificial variations): tilts, scaling, mosaic, rotations, etc.</p><p>A quick test showed that it’s perfectly viable to take the model — fine-tune and use it.</p><p>Visually, on test videos the best results were obtained with the mosaic configuration.</p><pre>data_yml = &#39;data/yolo-datasets/data.yaml&#39;<br>results = model.train(<br>    data=data_yml,<br>    epochs=150,           # Custom keypoints usually need more epochs<br>    imgsz=1280,           # Keep court details<br>    batch=4,              # Auto-batch (or 8-16 manually)<br>    device=0,             # GPU<br>    patience=50,<br>    augment=True,         # Critical for court variations (lighting, angle)<br>    hsv_h=0.015, hsv_s=0.7, hsv_v=0.4,<br>    degrees=20,<br>    translate=0.2,<br>    scale=0.9, shear=10.0, fliplr=0.5,<br>    mosaic=1.0, mixup=0.5,  # Strong augmentations for generalization<br>    optimizer=&quot;AdamW&quot;,<br>    lr0=0.001,<br>    close_mosaic=20,<br>    name=&quot;volleyball_court_yolo11m_pose_mosaic_bl&quot;,<br>    project=&quot;runs/yolo11m_pose&quot;,<br>    exist_ok=True<br>)</pre><h3>Manual data augmentation</h3><p>Annotated ~2800 frames.</p><p>If we consider unique camera + mounting position combinations, we get about 20 ± unique views where players move.</p><p>To prepare the model for unseen videos and to simulate different camera tilts, I decided to add 10-degree rotations in either direction.</p><p>The difficulty is that keypoints must be rotated together with the frame.</p><p>An important point is testing and verifying keypoint alignment after rotation.</p><p>The surprise was that the model has a scale factor of 2 between input and output: input 512×288 → output 256×144 heatmap.</p><p>The first version of the model showed low accuracy; I initially blamed the frame/keypoints misalignment after rotation.</p><p>Debugging and trying to visualize what exactly is fed during training was complicated because it required passing a debug mode flag.</p><p>A simple solution was using a flag-file:</p><pre>if os.path.exists(&#39;./tmp/debug.txt&#39;):<br>    save_image_and_heatmaps(...)py</pre><p>and simplifying the rotation code:</p><pre>img_rotation_matrix = cv2.getRotationMatrix2D(img_center, angle, 1.0)<br>hm_rotation_matrix = cv2.getRotationMatrix2D(hm_center, angle, 1.0)</pre><p>Also added intermediate visualization of what the model learned at different validation stages</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*VETPJVxQU9nBqMQ5Xb3hQw.jpeg" /><figcaption>volleyball court detection</figcaption></figure><p>Also added intermediate visualization of what the model learned at different validation stages</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*Wy5G4F58waUSJ1NYaKBCNw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29dc4f9f658b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>