Add specs page and link from version in panel (#130)

Closes: #126

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>

Reviewed-on: #130
This commit is contained in:
2024-03-10 19:23:31 -07:00
parent 76b2fe5b0c
commit ea43aa3306
7 changed files with 77 additions and 9 deletions

View File

@@ -116,8 +116,6 @@
import detectionMixin from './detection-mixin'
import cameraMixin from './camera-mixin'
import thoraxClasses from '../models/thorax/classes.json'
export default {
mixins: [submitMixin, detectionMixin, cameraMixin],
props: {
@@ -162,7 +160,7 @@
case 'thorax':
this.activeRegion = 0
this.detectorName = 'thorax'
this.classesList = thoraxClasses
//this.classesList = thoraxClasses
/* VITE setting */
this.modelLocation = '../models/thorax/model.json'
/* PWA Build setting */
@@ -181,6 +179,10 @@
this.activeRegion = 3
break;
}
import(`../models/${this.detectorName}/classes.json`).then((mod) => {
this.classesList = mod.default
this.detectorLabels = this.classesList.map( l => { return {'name': l, 'detect': true} } )
})
var loadServerSettings = localStorage.getItem('serverSettings')
if (loadServerSettings) this.serverSettings = JSON.parse(loadServerSettings)
},
@@ -190,7 +192,6 @@
this.modelLoading = false
} else {
this.modelLoading = true
this.detectorLabels = this.classesList.map( l => { return {'name': l, 'detect': true} } )
this.loadModel(this.isCordova ? this.modelLocationCordova : this.modelLocation).then(() => {
this.modelLoading = false
}).catch((e) => {