[{"data":1,"prerenderedAt":183},["ShallowReactive",2],{"blog-pushup-counter-shipped":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"tag":11,"body":12,"_type":177,"_id":178,"_source":179,"_file":180,"_stem":181,"_extension":182},"\u002Fblog\u002Fpushup-counter-shipped","blog",false,"","俯卧撑计数小程序上线了","姿态识别 + 自动计数的微信小程序第一版发布，记录这一路从想法到上线的过程与踩坑。","2026-07-08","更新",{"type":13,"children":14,"toc":170},"root",[15,31,37,49,69,74,99,108,113,147,152,165],{"type":16,"tag":17,"props":18,"children":19},"element","p",{},[20,23,29],{"type":21,"value":22},"text","一直想做个体能类的小程序，但市面上要么是「手动点 +1」，要么要戴手环。我想要的是：",{"type":16,"tag":24,"props":25,"children":26},"strong",{},[27],{"type":21,"value":28},"对着手机做，它自己数",{"type":21,"value":30},"。俯卧撑计数小程序第一版就这样上线了。",{"type":16,"tag":32,"props":33,"children":35},"h2",{"id":34},"核心思路",[36],{"type":21,"value":34},{"type":16,"tag":17,"props":38,"children":39},{},[40,42,47],{"type":21,"value":41},"用摄像头 + 姿态识别，检测到一次「下去—起来」的完整动作就 +1。关键不在识别多准，而在",{"type":16,"tag":24,"props":43,"children":44},{},[45],{"type":21,"value":46},"计数稳定不抖动",{"type":21,"value":48},"：",{"type":16,"tag":50,"props":51,"children":52},"ul",{},[53,59,64],{"type":16,"tag":54,"props":55,"children":56},"li",{},[57],{"type":21,"value":58},"用关键点角度判断「下去」阈值（肘肩髋近似一条直线）",{"type":16,"tag":54,"props":60,"children":61},{},[62],{"type":21,"value":63},"加迟滞（hysteresis），避免中途抖动重复计数",{"type":16,"tag":54,"props":65,"children":66},{},[67],{"type":21,"value":68},"本地计数，不上传视频，隐私友好",{"type":16,"tag":32,"props":70,"children":72},{"id":71},"技术栈",[73],{"type":21,"value":71},{"type":16,"tag":50,"props":75,"children":76},{},[77,82,87],{"type":16,"tag":54,"props":78,"children":79},{},[80],{"type":21,"value":81},"微信小程序原生（云开发兜底存储）",{"type":16,"tag":54,"props":83,"children":84},{},[85],{"type":21,"value":86},"姿态识别走端侧轻量模型",{"type":16,"tag":54,"props":88,"children":89},{},[90,92],{"type":21,"value":91},"计数逻辑用有限状态机： ",{"type":16,"tag":93,"props":94,"children":96},"code",{"className":95},[],[97],{"type":21,"value":98},"standby → down → up → 计数",{"type":16,"tag":100,"props":101,"children":103},"pre",{"code":102},"standby ──下到阈值──▶ down\ndown    ──回到直立──▶ up ──▶ +1 ──▶ standby\n",[104],{"type":16,"tag":93,"props":105,"children":106},{"__ignoreMap":7},[107],{"type":21,"value":102},{"type":16,"tag":32,"props":109,"children":111},{"id":110},"踩过的坑",[112],{"type":21,"value":110},{"type":16,"tag":114,"props":115,"children":116},"ol",{},[117,127,137],{"type":16,"tag":54,"props":118,"children":119},{},[120,125],{"type":16,"tag":24,"props":121,"children":122},{},[123],{"type":21,"value":124},"不同身高角度阈值漂移",{"type":21,"value":126},"：最后改成相对角度而非绝对像素，泛化好很多",{"type":16,"tag":54,"props":128,"children":129},{},[130,135],{"type":16,"tag":24,"props":131,"children":132},{},[133],{"type":21,"value":134},"iOS 摄像头权限时机",{"type":21,"value":136},"：必须在用户点击后同步申请，不能异步",{"type":16,"tag":54,"props":138,"children":139},{},[140,145],{"type":16,"tag":24,"props":141,"children":142},{},[143],{"type":21,"value":144},"计数误触发",{"type":21,"value":146},"：加 300ms 最小间隔，过滤鬼畜动作",{"type":16,"tag":32,"props":148,"children":150},{"id":149},"下一步",[151],{"type":21,"value":149},{"type":16,"tag":50,"props":153,"children":154},{},[155,160],{"type":16,"tag":54,"props":156,"children":157},{},[158],{"type":21,"value":159},"动作标准度评分（不只是数，还告诉你好不好）",{"type":16,"tag":54,"props":161,"children":162},{},[163],{"type":21,"value":164},"和「宠健宝」打通：宠物的运动量 vs 主人的运动量，做个趣味对照",{"type":16,"tag":17,"props":166,"children":167},{},[168],{"type":21,"value":169},"做这个小程序最大的体会还是那句：独立开发者现在敢试的东西，比一年前多太多了。",{"title":7,"searchDepth":171,"depth":171,"links":172},2,[173,174,175,176],{"id":34,"depth":171,"text":34},{"id":71,"depth":171,"text":71},{"id":110,"depth":171,"text":110},{"id":149,"depth":171,"text":149},"markdown","content:blog:pushup-counter-shipped.md","content","blog\u002Fpushup-counter-shipped.md","blog\u002Fpushup-counter-shipped","md",1785074386113]