Phone recognition
Example 31 uses an optional object detector. Point at another phone and enable «Mostrar detección y confianza» to see the detected box and confidence. Kai follows the box on screen. Inference runs locally in a worker.
Install the phone detector (example 31)
The detector is optional and distributed separately from webar-facil.min.js. To add it to your project, copy 31-reconocer-celular.html, the entire phone-detector/ folder alongside the HTML, and the GLB model you want to show.
- Keep
demo.js,worker.js,tf.min.js,coco-ssd.min.js,model.json, and all five files fromgroup1-shard1of5throughgroup1-shard5of5together. The weights manifest uses those exact names. IncludeLICENSE.txtand keepREADME.mdfor reference. - In the HTML, point the first
<script>to your copy ofwebar-facil.min.jsand keep<script type="module" src="./phone-detector/demo.js"></script>. If you change the GLB or folder layout, update the path indemo.js. The model path resolves relative todemo.js, not the HTML. - Serve the files over HTTPS or use
localhostduring development. The worker loads the weights from its own folder and processes camera frames locally.
Apps that only use markers or SLAM can use the SDK without copying the detector.