mirror of
https://github.com/BishopFox/eyeballer.git
synced 2026-11-10 09:41:29 -10:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
921a8f061d | ||
|
|
e94635ac00 |
No files matched your search
@@ -21,7 +21,6 @@ export class EyeballerComponent implements OnInit {
|
|||||||
model: any = null;
|
model: any = null;
|
||||||
|
|
||||||
imageCount = 0;
|
imageCount = 0;
|
||||||
finishedLoading = false;
|
|
||||||
eyeballing = false;
|
eyeballing = false;
|
||||||
eyeballCompleted = false;
|
eyeballCompleted = false;
|
||||||
eyeballedCount = 0;
|
eyeballedCount = 0;
|
||||||
@@ -144,12 +143,12 @@ export class EyeballerComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fetchTfFiles() {
|
async fetchTfFiles() {
|
||||||
let resp = await fetch('/assets/tf/model.json');
|
let resp = await fetch('assets/tf/model.json');
|
||||||
const manifest = await resp.json();
|
const manifest = await resp.json();
|
||||||
const paths: string[] = Array.from(manifest.weightsManifest[0]?.paths);
|
const paths: string[] = Array.from(manifest.weightsManifest[0]?.paths);
|
||||||
|
|
||||||
this.tfFiles = [];
|
this.tfFiles = [];
|
||||||
resp = await fetch('/assets/tf/model.json');
|
resp = await fetch('assets/tf/model.json');
|
||||||
const blob = await resp.blob();
|
const blob = await resp.blob();
|
||||||
this.tfFiles.push(new File([blob], 'model.json'));
|
this.tfFiles.push(new File([blob], 'model.json'));
|
||||||
await Promise.all(paths.map(async (path) => {
|
await Promise.all(paths.map(async (path) => {
|
||||||
@@ -161,7 +160,7 @@ export class EyeballerComponent implements OnInit {
|
|||||||
|
|
||||||
async fetchTfFile(name: string): Promise<File> {
|
async fetchTfFile(name: string): Promise<File> {
|
||||||
const base = name.split('/').reverse()[0];
|
const base = name.split('/').reverse()[0];
|
||||||
const resp = await fetch(`/assets/tf/${base}`);
|
const resp = await fetch(`assets/tf/${base}`);
|
||||||
const blob = await resp.blob();
|
const blob = await resp.blob();
|
||||||
return new File([blob], base);
|
return new File([blob], base);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Eyeballer</title>
|
<title>Eyeballer</title>
|
||||||
<base href="/">
|
<base href=".">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in new issue
Block a user