Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

85
Visualizações
Library To Detect Specific Object

I've been searching on google for the last few days and interesingly got a library to detect object using JavaScript. Here's the link:

GitHub Project

It's called ml5.js and it's built on top of TensorFlow. It uses machine learning algorithm that I am trying to get familiar. I tried to use one of their library from here:

Sample Project

Then type ObjectDetector_COCOSSD_single_image and requires to download it from here. I already downloaded it and run it using local server with VS Code. This code snippet though helped me a lot:

let objectDetector;

let img;
let objects = [];
let status;

function preload(){
  img = loadImage('images/cat.jpg');
}


function setup() {
  createCanvas(640, 420);

  objectDetector = ml5.objectDetector('cocossd', modelReady);

}

//Change the status when the model loads.
function modelReady() {
  console.log("model Ready!")
  status = true;
  console.log('Detecting') 
  objectDetector.detect(img, gotResult);
}

//A function to run when we get any errors and the results
function gotResult(err, results) {
  if (err) {
    console.log(err);
  }
  console.log(results)
  objects = results;
}


function draw() {
  //Unless the model is loaded, do not draw anything to canvas
  if (status != undefined) {
    image(img, 0, 0)

    for (let i = 0; i < objects.length; i++) {
      noStroke();
      fill(0, 255, 0);
      text(objects[i].label + " " + nfc(objects[i].confidence * 100.0, 2) + "%", objects[i].x + 5, objects[i].y + 15);
      noFill();
      strokeWeight(4);
      stroke(0, 255, 0);
      rect(objects[i].x, objects[i].y, objects[i].width, objects[i].height);
    }
  }
}

In the console log of the browser, I checked, it sent a request to this api - Model in jSon

It's a jSon file and the model to train, I believe. Though it's unable to detect all object properly like it detects turtle as bird, receipt as book. For the being, is there any model that I can make use of to this library or make it more accurate to detect object?

N.B: My plan is to detect paper specifically receipt from POS, I am not sure if I can modify the above code to make it work as expected though trying to figure out. Anyone has idea or worked on the library could share their opinion, so I can go ahead with it.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda