|
38 | 38 | </p> |
39 | 39 | </template> |
40 | 40 | </NcSettingsSection> |
| 41 | + <NcSettingsSection :name="t('recognize', 'Model Setting')"> |
| 42 | + <NcNoteCard v-if="modelsTargetPathWritable" show-alert type="success"> |
| 43 | + {{ t('recognize', 'The Model Target Path is Writable') }} |
| 44 | + </NcNoteCard> |
| 45 | + <NcNoteCard v-else-if="!modelsTargetPathWritable" show-alert type="warning"> |
| 46 | + {{ t('recognize', 'Model Target Path is not Writable') }} |
| 47 | + </NcNoteCard> |
| 48 | + <p> |
| 49 | + <NcTextField v-model="settings['models_target_path']" |
| 50 | + :label="t('recognize', 'Path Model Folder')" |
| 51 | + :label-visible="true" |
| 52 | + @update:model-value="onChange" /> |
| 53 | + </p> |
| 54 | + <p> |
| 55 | + {{ t('recognize', 'Changing this Value will require you to redownload the Models. Also the models in the old Directory need to be deleted manually') }} |
| 56 | + </p> |
| 57 | + </NcSettingsSection> |
41 | 58 | <NcSettingsSection :name="t('recognize', 'Classifier backend')"> |
42 | 59 | <NcNoteCard v-if="recognizeBackendInstalled" type="success"> |
43 | 60 | {{ t('recognize', 'The recognize_backend ExApp is installed; TaskProcessing mode is recommended.') }} |
|
81 | 98 | {{ t('recognize', 'Enable face recognition (groups photos by faces that appear in them; UI is in the photos app)') }} |
82 | 99 | </NcCheckboxRadioSwitch> |
83 | 100 | <NcTextField v-if="!settings['taskprocessing.enabled']" |
84 | | - :disabled="!settings['faces.enabled']" |
85 | 101 | v-model="settings['faces.batchSize']" |
| 102 | + :disabled="!settings['faces.enabled']" |
86 | 103 | :label-visible="true" |
87 | 104 | :label="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~500 or more, in WASM mode ~50 is recommended)')" |
88 | 105 | :title="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~500 or more, in WASM mode ~50 is recommended)')" |
|
130 | 147 | {{ t('recognize', 'Enable object recognition (e.g. food, vehicles, landscapes)') }} |
131 | 148 | </NcCheckboxRadioSwitch> |
132 | 149 | <NcTextField v-if="!settings['taskprocessing.enabled']" |
133 | | - :disabled="!settings['imagenet.enabled']" |
134 | 150 | v-model="settings['imagenet.batchSize']" |
| 151 | + :disabled="!settings['imagenet.enabled']" |
135 | 152 | :label-visible="true" |
136 | 153 | :label="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~100 or more, in WASM mode ~20 is recommended)')" |
137 | 154 | :title="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~100 or more, in WASM mode ~20 is recommended)')" |
|
146 | 163 | {{ t('recognize', 'Enable landmark recognition (e.g. Eiffel Tower, Golden Gate Bridge)') }} |
147 | 164 | </NcCheckboxRadioSwitch> |
148 | 165 | <NcTextField v-if="!settings['taskprocessing.enabled']" |
149 | | - :disabled="!settings['imagenet.enabled'] || !settings['landmarks.enabled']" |
150 | 166 | v-model="settings['landmarks.batchSize']" |
| 167 | + :disabled="!settings['imagenet.enabled'] || !settings['landmarks.enabled']" |
151 | 168 | :label-visible="true" |
152 | 169 | :label="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~100 or more, in WASM mode ~20 is recommended)')" |
153 | 170 | :title="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~100 or more, in WASM mode ~20 is recommended)')" |
|
177 | 194 | {{ t('recognize', 'Enable music genre recognition (e.g. pop, rock, folk, metal, new age)') }} |
178 | 195 | </NcCheckboxRadioSwitch> |
179 | 196 | <NcTextField v-if="!settings['taskprocessing.enabled']" |
180 | | - :disabled="!settings['musicnn.enabled']" |
181 | 197 | v-model="settings['musicnn.batchSize']" |
| 198 | + :disabled="!settings['musicnn.enabled']" |
182 | 199 | :label-visible="true" |
183 | 200 | :label="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~100 or more, in WASM mode ~20 is recommended)')" |
184 | 201 | :title="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~100 or more, in WASM mode ~20 is recommended)')" |
|
211 | 228 | {{ t('recognize', 'Enable human action recognition (e.g. arm wrestling, dribbling basketball, hula hooping)') }} |
212 | 229 | </NcCheckboxRadioSwitch> |
213 | 230 | <NcTextField v-if="!settings['taskprocessing.enabled']" |
214 | | - :disabled="!settings['movinet.enabled']" |
215 | 231 | v-model="settings['movinet.batchSize']" |
| 232 | + :disabled="!settings['movinet.enabled']" |
216 | 233 | :label-visible="true" |
217 | 234 | :label="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~20 or more, in WASM mode ~5 is recommended)')" |
218 | 235 | :title="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~20 or more, in WASM mode ~5 is recommended)')" |
@@ -445,7 +462,7 @@ const TASK_PROCESSING_TASK_TYPES = { |
445 | 462 | musicnn: 'recognize:audio:classification', |
446 | 463 | } |
447 | 464 |
|
448 | | -const SETTINGS = ['tensorflow.cores', 'tensorflow.gpu', 'tensorflow.purejs', 'imagenet.enabled', 'landmarks.enabled', 'faces.enabled', 'musicnn.enabled', 'movinet.enabled', 'node_binary', 'ffmpeg_binary', 'faces.status', 'imagenet.status', 'landmarks.status', 'movinet.status', 'musicnn.status', 'faces.lastFile', 'imagenet.lastFile', 'landmarks.lastFile', 'movinet.lastFile', 'musicnn.lastFile', 'faces.batchSize', 'imagenet.batchSize', 'landmarks.batchSize', 'movinet.batchSize', 'musicnn.batchSize', 'clusterFaces.status', 'clusterFaces.lastRun', 'nice_binary', 'nice_value', 'concurrency.enabled', 'taskprocessing.enabled'] |
| 465 | +const SETTINGS = ['tensorflow.cores', 'tensorflow.gpu', 'tensorflow.purejs', 'imagenet.enabled', 'landmarks.enabled', 'faces.enabled', 'musicnn.enabled', 'movinet.enabled', 'node_binary', 'ffmpeg_binary', 'faces.status', 'imagenet.status', 'landmarks.status', 'movinet.status', 'musicnn.status', 'faces.lastFile', 'imagenet.lastFile', 'landmarks.lastFile', 'movinet.lastFile', 'musicnn.lastFile', 'faces.batchSize', 'imagenet.batchSize', 'landmarks.batchSize', 'movinet.batchSize', 'musicnn.batchSize', 'clusterFaces.status', 'clusterFaces.lastRun', 'nice_binary', 'nice_value', 'concurrency.enabled', 'taskprocessing.enabled', 'models_target_path', 'models_archive_file'] |
449 | 466 |
|
450 | 467 | const BOOLEAN_SETTINGS = ['tensorflow.gpu', 'tensorflow.purejs', 'imagenet.enabled', 'landmarks.enabled', 'faces.enabled', 'musicnn.enabled', 'movinet.enabled', 'faces.status', 'imagenet.status', 'landmarks.status', 'movinet.status', 'musicnn.status', 'faces.lastFile', 'imagenet.lastFile', 'landmarks.lastFile', 'movinet.lastFile', 'musicnn.lastFile', 'clusterFaces.status', 'concurrency.enabled', 'taskprocessing.enabled'] |
451 | 468 |
|
@@ -487,6 +504,7 @@ export default { |
487 | 504 | musicnnTpStats: null, |
488 | 505 | tagsEnabled: null, |
489 | 506 | recognizeBackendInstalled: false, |
| 507 | + modelsTargetPathWritable: null, |
490 | 508 | } |
491 | 509 | }, |
492 | 510 |
|
@@ -523,6 +541,7 @@ export default { |
523 | 541 | }, |
524 | 542 | async created() { |
525 | 543 | this.modelsDownloaded = loadState('recognize', 'modelsDownloaded') |
| 544 | + this.modelsTargetPathWritable = loadState('recognize', 'modelsTargetPathWritable') |
526 | 545 | this.tagsEnabled = loadState('recognize', 'tagsEnabled') |
527 | 546 | this.recognizeBackendInstalled = loadState('recognize', 'recognizeBackendInstalled', false) |
528 | 547 | this.getCount() |
|
0 commit comments