Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I finally rewritten a function like this and it's working now.

function loadModels() { var proto = 'MobileNetSSD_deploy.prototxt'; var weights = 'MobileNetSSD_deploy.caffemodel'; utils.createFileFromUrl(proto, proto, () => { document.getElementById('status').innerHTML = 'Downloading ' + proto; utils.createFileFromUrl(weights, weights, () => { document.getElementById('status').innerHTML = 'Downloading ' + weights; netDet=cv.readNetFromCaffe(proto, weights); console.log('Transfer completed.'); document.getElementById('status').innerHTML = 'Caffe network loaded.'; }); }); }

I finally rewritten a function like this and it's working now.

function loadModels() { var proto = 'MobileNetSSD_deploy.prototxt'; var weights = 'MobileNetSSD_deploy.caffemodel'; utils.createFileFromUrl(proto, proto, () => { document.getElementById('status').innerHTML = 'Downloading ' + proto; utils.createFileFromUrl(weights, weights, () => { document.getElementById('status').innerHTML = 'Downloading ' + weights; netDet=cv.readNetFromCaffe(proto, weights); console.log('Transfer completed.'); document.getElementById('status').innerHTML = 'Caffe network loaded.'; }); }); }

I finally rewritten a function like this and it's working now.

function loadModels() {
 var proto = 'MobileNetSSD_deploy.prototxt';
 var weights = 'MobileNetSSD_deploy.caffemodel';
 utils.createFileFromUrl(proto, proto, () =>
 {
     document.getElementById('status').innerHTML = 'Downloading ' + proto;
     utils.createFileFromUrl(weights, weights, () =>
     {
         document.getElementById('status').innerHTML = 'Downloading ' + weights;
         netDet=cv.readNetFromCaffe(proto,  weights);
         console.log('Transfer completed.');
         document.getElementById('status').innerHTML = 'Caffe network loaded.';
     });
 });

}

I finally rewritten a function like this and it's working now.

function loadModels() {
var proto = 'MobileNetSSD_deploy.prototxt';
var weights = 'MobileNetSSD_deploy.caffemodel';
utils.createFileFromUrl(proto, proto, () =>
{
    document.getElementById('status').innerHTML = 'Downloading ' + proto;
    utils.createFileFromUrl(weights, weights, () =>
    {
        document.getElementById('status').innerHTML = 'Downloading ' + weights;
        netDet=cv.readNetFromCaffe(proto,  weights);
        console.log('Transfer completed.');
        document.getElementById('status').innerHTML = 'Caffe network loaded.';
    });
});
}

}