i am running javascript frontend with django backend. Here is the structure
-app
--templates
---index.html
--static
---index.js
---haarcascade_frontalface_alt.xml
---style.css
--views.py
--urls.py
I can see css style in my index.html page. But the index.js file is unable to pick haarcascade_frontalface_alt.xml.
The code is as follow
const HAARCASCADE_URI = "haarcascade_frontalface_alt.xml"
this.classifier = new cv.CascadeClassifier();
let faceCascadeFile = "haarcascade_frontalface_alt.xml";
if (!this.classifier.load(faceCascadeFile)) {
await this.createFileFromUrl(faceCascadeFile, this.classifierPath);
this.classifier.load(faceCascadeFile)
}
but it say
Failed to load haarcascade_frontalface_alt.xml status: 404