Skip to content
This repository has been archived by the owner on Feb 28, 2020. It is now read-only.

haarcascade_frontalface_def.xml Not found #80

Open
ThisIsGettingWeird opened this issue Aug 29, 2015 · 1 comment
Open

haarcascade_frontalface_def.xml Not found #80

ThisIsGettingWeird opened this issue Aug 29, 2015 · 1 comment

Comments

@ThisIsGettingWeird
Copy link

Hey guys, apologies in advance, I'm a complete novice to this coding thing (although this has piqued my interest). I'm having some trouble running the code on windows 10.
Initially I had to define JAVA_HOME as a system wide variable so that the batch file could locate the JDK. Then I had an error of "the input line is too long" in CMD. This was related to the set set "APP_CLASSPATH" command specifying many files and so being too long. So I replaced it with this: set "APP_CLASSPATH=%APP_LIB_DIR%*"

So now things appear to be working, I can get onto the hosted server and things seem to function ok. But the average faces haven't been computed and the bot hasn't made any actions (despite many manual swipes).

I think it's related to the below output...

[debug] application - [tinderbot] Starting new facial analysis task for 5561dff5
263da1b91e20ceb9.
[debug] application - [mapdb] Database committer has persisted data to disk.
[info] application - [tinderbot] Received command: run
[error] application - [tinderbot] Retrying a troubled supervised task:
haarcascade_frontalface_default.xml (The system cannot find the file specified)
[ERROR] [08/29/2015 12:48:14.438] [application-akka.actor.default-dispatcher-5]
[akka://application/user/TinderBot/BotSupervisor/$d] haarcascade_frontalface_def
ault.xml (The system cannot find the file specified)
java.io.FileNotFoundException: haarcascade_frontalface_default.xml (The system c
annot find the file specified)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at java.io.FileInputStream.<init>(FileInputStream.java:93)
        at jviolajones.Detector.<init>(Detector.java:33)
        at utils.face.FacialDetection.detectFaces(FacialDetection.scala:26)
        at utils.face.FacialDetection.extractFaces(FacialDetection.scala:39)
        at models.bot.tasks.FacialAnalysisTask$$anonfun$receive$1$$anonfun$apply
OrElse$2.apply(FacialAnalysisTask.scala:39)
        at models.bot.tasks.FacialAnalysisTask$$anonfun$receive$1$$anonfun$apply
OrElse$2.apply(FacialAnalysisTask.scala:38)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244)
        at scala.collection.immutable.List.foreach(List.scala:318)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)

        at scala.collection.AbstractTraversable.map(Traversable.scala:105)
        at models.bot.tasks.FacialAnalysisTask$$anonfun$receive$1.applyOrElse(Fa
cialAnalysisTask.scala:38)
        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498)
        at akka.actor.ActorCell.invoke(ActorCell.scala:456)
        at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237)
        at akka.dispatch.Mailbox.run(Mailbox.scala:219)
        at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(Abst
ractDispatcher.scala:386)
        at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool
.java:1339)
        at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:19
79)
        at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThre
ad.java:107)

Thanks heaps in advance to anyone who might help

@lazyhummingbird
Copy link

I've had the exact same experience. To get Windows running the .bat file properly, it seemed that all that is required was changing the APP_CLASSPATH line to java -cp "%APP_LIB_DIR%/*" play.core.server.NettyServer (this seems to get around the long line error described above while still loading all the libraries). However, the XML file for Haar Cascades (pretty integral to the computer vision detection) won't load. Pls halp.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants