Parse model urls for full generalization
All checks were successful
Build Dev PWA / Build-PWA (push) Successful in 42s
All checks were successful
Build Dev PWA / Build-PWA (push) Successful in 42s
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user