diff --git a/src/pages/detect.vue b/src/pages/detect.vue index f9b0d76..e2a7ec9 100644 --- a/src/pages/detect.vue +++ b/src/pages/detect.vue @@ -141,9 +141,6 @@ import cameraMixin from './camera-mixin' import detectionWorker from '@/assets/detect-worker.js?worker&inline' -// import thoraxModel from '/models/thorax/model.json?url' -// console.log(thoraxModel) -// import thoraxModelMini from '/models/thorax-mini/model.json?url' export default { mixins: [submitMixin, detectionMixin, cameraMixin], @@ -208,9 +205,11 @@ this.activeRegion = 3 break; } - this.modelLocation = `/models/${this.detectorName}${this.otherSettings.mini ? '-mini' : ''}/model.json` - this.miniLocation = `/models/${this.detectorName}-mini/model.json` - fetch(`/models/${this.detectorName}/classes.json`) + //this.modelLocation = `../models/${this.detectorName}${this.otherSettings.mini ? '-mini' : ''}/model.json` + //this.miniLocation = `../models/${this.detectorName}-mini/model.json` + this.modelLocation = URL.parse(`../models/${this.detectorName}${this.otherSettings.mini ? '-mini' : ''}/model.json`,import.meta.url).href + this.miniLocation = URL.parse(`../models/${this.detectorName}-mini/model.json`,import.meta.url).href + fetch(URL.parse(`../models/${this.detectorName}/classes.json`,import.meta.url).href) .then((mod) => { return mod.json() }) .then((classes) => { this.classesList = classes