Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

237
Views
How to use COCO-SSD to search for specific objects, in order to take measurements from them

I am attempting to create an app to detect a ball and another object while taking a video, say a racket, and these objects must be in FOV of the camera all the time to activate a function that then takes the average speed of the ball. I have established a site that does request permission to access webcam and displays it on screen, while making a recording button and all. However, my issues start turning up in my Javascript.EDIT:Start Recording contains id="togglerecordingmodeEl" onclick="toggleRecording()" HTML: Start Recording

Preview

JavaScript:

        let video = null; // video element
        let detector = null; // detector object
        let detections = []; // store detection result
        let videoVisibility = true;
        let detecting = false;

        const toggleRecordingEl = document.getElementById('toggleRecordingEl');

        function toggleRecording() {
            if (!video || !detector) return;
            if (!detecting) {
                detect();
                toggleDetectingEl.innerText = 'Stop Detecting';
            } else {
                toggleDetectingEl.innerText = 'Start Detecting';
            }
            detecting = !detecting;
        }

        function detect() {
            // instruct "detector" object to start detect object from video element
            // and "onDetected" function is called when object is detected
            detector.detect(video, onDetected);
        }

        // callback function. it is called when object is detected
        function onDetected(error, results) {
            if (error) {
                console.error(error);
            }
            detections = results;
        }

In summary, I want it to first recognise two objects in the FOV, and only if these two objects are in the FOV, then I can work on a new function. I have used https://medium.com/the-web-tub/object-detection-with-javascript-the-easy-way-74fbe98741cf & https://developer.mozilla.org/en-US/docs/Web/API/MediaStream_Recording_API/Recording_a_media_element to construct this app so far.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!