自从ml5 yolo()提到
“这个实现很大程度上来自于ModelDepot”。
它没有提到它正在使用的火车前模型,也没有提到你如何使用你自己训练过的模型。
let video;
let yolo;
let status;
let objects = [];
function setup() {
createCanvas(320, 240);
video = createCapture(VIDEO);
video.size(320, 240);
// Create a YOLO method
yolo = ml5.YOLO(video, startDetecting);
// Hide the original video
video.hide();
status = select('#status');
}
function draw() {
image(video, 0, 0, width, height);
for (let i = 0; i < objects.length; i++) {
noStroke();
fill(0, 255, 0);
text(objects[i].className, objects[i].x * width, objects[i].y * height - 5);
noFill();
strokeWeight(4);
stroke(0, 255, 0);
rect(objects[i].x * width, objects[i].y * height, objects[i].w * width, objects[i].h * height);
}
}
function startDetecting() {
status.html('Model loaded!');
detect();
}
function detect() {
yolo.detect(function(err, results) {
objects = results;
detect();
});
}发布于 2019-06-08 23:58:10
我一直在阅读yolo文档,我找到了一种方法:
Ml5-yolo-库->从https://github.com/ModelDepot/tfjs-yolo-tiny中大量派生(ModelDepot: modeldepot.io)
在这里,-> https://modeldepot.io/mikeshi/tiny-yolo-in-javascript
->说,这个模型是通过使用原始的Darknet微型YOLO和权值创建的,通过YAD2K将其转换为Keras,然后使用tensorflowjs_converter将其转换为Tensorflow.js格式。
所以,我现在也想和你一样。希望我能找到办法
https://stackoverflow.com/questions/55376841
复制相似问题