瀏覽代碼

Move anime face model to root, ignore builds folder

ghorsington 4 年之前
父節點
當前提交
949e438043
共有 3 個文件被更改,包括 2 次插入3 次删除
  1. 1 2
      .gitignore
  2. 0 0
      animu.xml
  3. 1 1
      src/commands/facemorph.ts

+ 1 - 2
.gitignore

@@ -1,5 +1,4 @@
-*.js
-*.js.map
+build/
 
 *.sqlite
 

build/animu.xml → animu.xml


+ 1 - 1
src/commands/facemorph.ts

@@ -11,7 +11,7 @@ import { ObjectChain } from "lodash";
 
 const EMOTE_GUILD = "505333548694241281";
 
-const animeCascade = new cv.CascadeClassifier(path.resolve(__dirname, "../animu.xml"));
+const animeCascade = new cv.CascadeClassifier(path.resolve(process.cwd(), "animu.xml"));
 const faceCascade = new cv.CascadeClassifier(cv.HAAR_FRONTALFACE_ALT2);
 
 type ImageProcessor = (faces: cv.Rect[], data: Buffer) => Promise<Jimp>;