init mediapipe & tensorflow

This commit is contained in:
mphstar 2025-02-22 18:55:42 +07:00
parent 8e8d317da3
commit dc7e39f6d3
1 changed files with 5 additions and 5 deletions

View File

@ -58,11 +58,13 @@ const Home = () => {
if (videoRef.current) {
videoRef.current.srcObject = stream;
mediapipeHelper = new MediapipeHelper(videoRef);
detectionHelper = new DetectionHelper();
console.log("Camera access granted and helpers initialized.");
}
mediapipeHelper = new MediapipeHelper(videoRef);
detectionHelper = new DetectionHelper();
setLoadCamera(true);
onHandDetected();
} catch (error) {
@ -79,9 +81,7 @@ const Home = () => {
startWebcam();
return () => {
};
return () => {};
}, []);
return (