Slide 12
Slide 12 text
ਓͷηάϝϯ
ςʔγϣϯ
async function estimateSegmentation() {
return await state.net.segmentPerson(state.video, {
internalResolution: segmentationOption.internalResolution,
segmentationThreshold: segmentationOption.segmentationThreshold,
maxDetections: segmentationOption.multiDecodingMaxDetections,
scoreThreshold: segmentationOption.multiDecodingScoreThreshold,
nmsRadius: segmentationOption.multiDecodingNmsRadius,
});
}
function segmentBodyInRealTime() {
const canvas = document.getElementById('output');
const img = document.getElementById('bg_img');
async function bodySegmentationFrame() {
// segmentation
const personSegmentation = await estimateSegmentation();
toMaskImage(canvas, personSegmentation, state.video, img);
requestAnimationFrame(bodySegmentationFrame);
}
bodySegmentationFrame();
}
• segmentPerson()Ͱηάϝ
ϯςʔγϣϯऔಘ
• ֤ϐΫηϧʹɺਓͳΒ”1”
ਓҎ֎ͳΒ”0”͕༩͞Ε
Δ
12