【发布时间】:2019-08-17 23:58:17
【问题描述】:
因为 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();
});
}
【问题讨论】:
-
感谢您分享您的代码和问题。你能具体说明你的问题吗?
-
@Archie 我刚回来遇到了 ml5,我发现它很容易使用,所以我决定按照那里的文档使用 yolo,它工作正常。但我想使用我自己训练有素的模型。例如,它没有检测到魔方,我想使用我自己的训练模型,知道什么是魔方。换句话说,我只想使用其他一些预训练模型
-
由于某种情况,我不得不用javascript制作yolo模型,我对python不太熟悉
-
来自我的消息来源,他们没有在文档中提及,但我认为他们正在使用 github.com/ml5js/ml5-data-and-models/tree/master/models/YOLO 这个预训练模型
标签: machine-learning computer-vision object-detection tensorflow.js yolo