Open thirukumars opened 5 years ago
Hello, what I did is go into the ml5.min.js and find the path they use to load the model. You'll probably have to change it so something like: http://localhost:5000/YOLO/model.json
According to the documentation for version 0.4.2 you are allowed to specify the path to the model json
file this way:
const classifier = ml5.imageClassifier('path/to/custom/model.json', modelReady)
const yolo = ml5.YOLO({modelUrl: 'http://localhost:5000/yolo/model.json'}, callback);
this is my code
import React, { Component , Fragment } from 'react'; // import ml5 from './ml5.min.js' import p5 from 'p5' import MyComponent from './MyComponent' import "bootstrap/dist/css/bootstrap.min.css"; import "p5/lib/addons/p5.dom"; import './object.css' let video; let yolo; var stop=false var no_of_times=0; // export let objects = []; var array=[];
export default class Detection extends Component { constructor() { super() this.stop = this.stop.bind(this) }
})