Import Handtrack.js via Script Tag
masterYou can include Handtrack.js directly in your HTML using a script tag from jsDelivr. Ensure that any images you use have appropriate CORS settings to allow the library to read them.
<!-- Load the handtrackjs model. -->
<script src="https://cdn.jsdelivr.net/npm/handtrackjs@latest/dist/handtrack.min.js"></script>
<!-- Replace this with your image. -->
<img id="img" src="hand.jpg"/>
<script>
const img = document.getElementById('img');
const model = await handTrack.load();
const predictions = await model.detect(img);
</script>