Skip to content

Commit

Permalink
fix Export structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
UrielCh committed Apr 30, 2024
1 parent 3531f39 commit 64322ad
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 4 deletions.
8 changes: 7 additions & 1 deletion examples/src/AgeGender/AgeGender.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import fs from 'node:fs';
import mri from 'mri';
import * as openCV from '@u4/opencv4nodejs';
import { Mat, Net, Point2, Rect, Size, Vec3, VideoCapture } from '@u4/opencv4nodejs';
import { cv, getCachedFile, getExampleDirname, wait4key } from '../utils.js';
import NetIdentifier from './NetIdentifier.js';
Expand Down Expand Up @@ -62,8 +63,13 @@ const main = async () => {

// Load network
if (!fs.existsSync(ageModel)) {
throw Error(`fail to read ${ageModel}`);
throw Error(`fail to read ${ageModel} please download if from https://www.dropbox.com/s/xfb20y596869vbb/age_net.caffemodel?dl=0`);
}

if (!fs.existsSync(genderModel)) {
throw Error(`fail to read ${genderModel} please download if from https://www.dropbox.com/s/iyv483wz7ztr9gh/gender_net.caffemodel?dl=0`);
}

if (!fs.existsSync(ageProto)) {
throw Error(`fail to read ${ageProto}`);
}
Expand Down
Loading

0 comments on commit 64322ad

Please sign in to comment.