|
| 1 | +--- |
| 2 | +title: "GSoC '25 Week 17 and Bug Fixes Update by Aditya Kumar Singh" |
| 3 | +excerpt: "Final polish: template palette, fullscreen mode implemented, export/import refinements, shared-mode fixes, localization and final report PRs." |
| 4 | +category: "DEVELOPER NEWS" |
| 5 | +date: "2025-09-09" |
| 6 | +slug: "2025-09-09-gsoc-25-AdityaKrSingh26-week17" |
| 7 | +author: "@/constants/MarkdownFiles/authors/aditya-singh.md" |
| 8 | +tags: "gsoc25,sugarlabs,week17,AdityaKrSingh26,final" |
| 9 | +image: "assets/Images/GSOC.webp" |
| 10 | +--- |
| 11 | + |
| 12 | +<!-- markdownlint-disable --> |
| 13 | + |
| 14 | +# Week 17 Progress and Bug Fix Report by Aditya Kumar Singh |
| 15 | + |
| 16 | +**Project:** [Sugarizer](https://github.com/llaske/sugarizer) |
| 17 | +**Mentors:** [Lionel Laské](https://github.com/llaske) |
| 18 | +**Assisting Mentors:** [Samarth Bagga](https://github.com/SamarthBagga) |
| 19 | +**Reporting Period:** 2025-09-03 - 2025-09-10 |
| 20 | + |
| 21 | +--- |
| 22 | + |
| 23 | +## Goals for this week |
| 24 | + |
| 25 | +- Land final UX polish and localization for the Template Palette. |
| 26 | +- Implement fullscreen viewing mode and evaluate behavior after canvas resize. |
| 27 | +- Make export-to-video produce standard-resolution outputs and verify parity with preview. |
| 28 | +- Harden PoseNet-based import from video and prevent multi-person crashes. |
| 29 | +- Finish documentation / PRs: weekly progress + final report. |
| 30 | + |
| 31 | +--- |
| 32 | + |
| 33 | +## This week’s achievements |
| 34 | + |
| 35 | +1. **Published progress and final report PRs** |
| 36 | + - Created and submitted the weekly progress PR documenting the code changes, decisions, and open issues. |
| 37 | + - Submitted the final GSoC report as a PR summarizing the whole project and linking the main feature merges. The final report contains the overall timeline, metrics, and merged PR list. |
| 38 | + - Final Submissions : |
| 39 | + - [GSoC '25 Final Report by Aditya Kumar Singh](https://www.sugarlabs.org/news/all/2025-08-31-gsoc-25-AdityaKrSingh26-final-report) |
| 40 | + - [GSoC '25 Project Page](https://summerofcode.withgoogle.com/programs/2025/projects/etFtxnpi) |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | +3. **Fullscreen viewing mode** |
| 45 | + - **Fullscreen implemented.** A fullscreen toggle hides toolbars and the timeline, enlarges the canvas to the viewport, and reveals an "unfullscreen" control. The code adds/removes a `fullscreen` class on the canvas and calls `resizeCanvas()` to recompute dimensions. |
| 46 | + - **Optimized fullscreen behavior for video preview.** Frame list / thumbnails are hidden in fullscreen to provide an uncluttered video-showing mode. This makes the activity better for presentations or playback-only viewing. |
| 47 | + |
| 48 | +4. **Export-to-Video — fixed resolution and preview parity** |
| 49 | + - **Standard resolutions.** Export pipeline changed from recording the raw bounding box dimensions to rendering at fixed standard resolutions (720p and 1080p). This makes outputs predictable and easier to share. The export code now renders the animation frames into a fixed-size canvas before feeding them to MediaRecorder. |
| 50 | + - **Verified preview parity.** Exported video frames are rendered using the same frame reconstruction (baseFrames + deltaFrames) and same `enforceJointDistances()` constraints that power the activity preview, ensuring exported video matches what users see in the editor. |
| 51 | + |
| 52 | +5. **Import from video (PoseNet) — safer, more robust** |
| 53 | + - **Limit to one stickman per video import.** Import flow now only produces a single stickman from a video to avoid crashes and ambiguity when PoseNet detects multiple people. This was a pragmatic choice to keep the feature reliable on low-end devices and in shared sessions. The import flow and library-loading guard live in `activity.js`. |
| 54 | + - **Model selection & loading UX.** PoseNet can be loaded as either MobileNet (fast, light) or ResNet (heavier, more accurate). A loading spinner and disabled UI guard prevent user interactions while TensorFlow.js/Posenet models initialize. There is also a timeout to avoid indefinite blocking. |
| 55 | + - **Frame de-duplication & joint constraints.** Duplicate consecutive frames are skipped and `enforceJointDistances()` is applied after mapping PoseNet keypoints to the stickman skeleton to avoid odd limb lengths. This reduces noise and yields smoother imported animations. |
| 56 | + |
| 57 | +6. **Shared mode improvements and remote-offset handling** |
| 58 | + - **Remote offsets stored separately.** When a remote user drags a stickman locally, the offset is stored in `remoteStickmanPositions[stickmanId]` and only applied during rendering. This prevents network updates from wiping out local adjustments. |
| 59 | + - **Global vs local moves clarified.** Frame 0 changes are considered global (applied across all frames); moves on later frames are local. Tutorials were updated to explain this, and color-coded indicators were added to the UI. The tutorial and network handlers are updated in the activity code. |
| 60 | + - **Preserve local positioning across drags.** Multiple drag ops no longer accumulate errors; offsets are re-applied consistently so remote stickmen remain stable during playback. |
| 61 | + |
| 62 | +7. **Joint color coding & small UI/UX refinements** |
| 63 | + - **Joint color coding restored:** red = end joints (movable), orange = parent joints (move children), green = hip joint (dragging center). These colors improve discoverability for new users. (Color code implemented in the rendering path.) |
| 64 | + - **Template palette UI finalized.** Buttons follow Sugar UI look-and-feel, previews autoplay muted, and palette close/active state behavior is stabilized. |
| 65 | + |
| 66 | +--- |
| 67 | + |
| 68 | +## Challenges & How I Overcame Them |
| 69 | + |
| 70 | +- **Challenge:** Users dragging remote stickmen observed position jumps when network updates arrived. |
| 71 | + **Solution:** Keep original network joints and a separate local offset; apply offset only during rendering. This preserves local adjustments without interfering with incoming updates. |
| 72 | + |
| 73 | +- **Challenge:** PoseNet sometimes detects multiple people and mapping to a single stickman led to crashes or malformed animations. |
| 74 | + **Solution:** Limit video import to a single detected person, randomize imported stickman placement to avoid overlap, and apply `enforceJointDistances()` after mapping. Also added frame deduplication to reduce noise. |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +## Acknowledgments |
| 79 | + |
| 80 | +Thanks to Lionel Laské and Samarth Bagga for patient guidance and code review, and to the Sugar Labs community for testing and helpful UX feedback. The work this week packaged final UX polish, export/import stability, and the template system into a form ready for the wider community to try and extend. |
| 81 | + |
| 82 | +--- |
0 commit comments