You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is my code:
`
Navigator.getUserMedia =
Navigator.getUserMedia ||
Navigator.webkitUserMedia ||
Navigator.mozUserMedia ||
Navigator.msUserMedia;
const modelParams = {
flipHorizontal: true, // flip e.g for video
imageScaleFactor: 0.7, // reduce input image size for gains in speed.
maxNumBoxes: 20, // maximum number of boxes to detect
iouThreshold: 0.5, // ioU threshold for non-max suppression
scoreThreshold: 0.79, // confidence threshold for predictions.
};
this is my code:
`
Navigator.getUserMedia =
Navigator.getUserMedia ||
Navigator.webkitUserMedia ||
Navigator.mozUserMedia ||
Navigator.msUserMedia;
const modelParams = {
flipHorizontal: true, // flip e.g for video
imageScaleFactor: 0.7, // reduce input image size for gains in speed.
maxNumBoxes: 20, // maximum number of boxes to detect
iouThreshold: 0.5, // ioU threshold for non-max suppression
scoreThreshold: 0.79, // confidence threshold for predictions.
};
const video = document.querySelector("#video");
const audio = document.querySelector("#audio");
const canvas = document.querySelector("canvas");
const context = canvas.getContext("2d");
let model;
handTrack.startVidseo(video)
.then((status) => {
if (status) {
navigator.getUserMedia(
{ video: {} },
(stream) => {
video.srcObject = stream;
setInterval(doTheDetection, 1000);
},
(err) => console.log(err)
);
}
});
function doTheDetection() {
}
handTrack.load(modelParams).then((lmodel) => {
model = lmodel;
`});````
this is the result:
The text was updated successfully, but these errors were encountered: