Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bounding Box Test and Training endpoint Exception #57

Open
ivancruzbht opened this issue Mar 23, 2017 · 3 comments
Open

Bounding Box Test and Training endpoint Exception #57

ivancruzbht opened this issue Mar 23, 2017 · 3 comments

Comments

@ivancruzbht
Copy link

ivancruzbht commented Mar 23, 2017

I am trying to use this endpoint to start the training. I have already created the bounding boxes for my whole dataset. I checked the h2 db and the data seems correct: http://imgur.com/a/sCzAO

When I use the endpoint I got this error: http://imgur.com/a/io5nY

This is the output of console

[error] - application - 

! @73e8ifnao - Internal server error, for (GET) [/generate_bounding_box_train_and_test_files] ->
 
play.api.http.HttpErrorHandlerExceptions$$anon$1: Execution exception[[NullPointerException: null]]
	at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:265) ~[play_2.11-2.4.6.jar:2.4.6]
	at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:191) ~[play_2.11-2.4.6.jar:2.4.6]
	at play.api.GlobalSettings$class.onError(GlobalSettings.scala:179) [play_2.11-2.4.6.jar:2.4.6]
	at play.api.DefaultGlobal$.onError(GlobalSettings.scala:212) [play_2.11-2.4.6.jar:2.4.6]
	at play.api.http.GlobalSettingsHttpErrorHandler.onServerError(HttpErrorHandler.scala:94) [play_2.11-2.4.6.jar:2.4.6]
	at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$9$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:151) [play-netty-server_2.11-2.4.6.jar:2.4.6]
	at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$9$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:148) [play-netty-server_2.11-2.4.6.jar:2.4.6]
	at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36) [scala-library-2.11.6.jar:na]
	at scala.util.Failure$$anonfun$recover$1.apply(Try.scala:215) [scala-library-2.11.6.jar:na]
	at scala.util.Try$.apply(Try.scala:191) [scala-library-2.11.6.jar:na]
	at scala.util.Failure.recover(Try.scala:215) [scala-library-2.11.6.jar:na]
	at scala.concurrent.Future$$anonfun$recover$1.apply(Future.scala:324) [scala-library-2.11.6.jar:na]
	at scala.concurrent.Future$$anonfun$recover$1.apply(Future.scala:324) [scala-library-2.11.6.jar:na]
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) [scala-library-2.11.6.jar:na]
	at play.api.libs.iteratee.Execution$trampoline$.executeScheduled(Execution.scala:109) [play-iteratees_2.11-2.4.6.jar:2.4.6]
	at play.api.libs.iteratee.Execution$trampoline$.execute(Execution.scala:71) [play-iteratees_2.11-2.4.6.jar:2.4.6]
	at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:40) [scala-library-2.11.6.jar:na]
	at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:248) [scala-library-2.11.6.jar:na]
	at scala.concurrent.Promise$class.complete(Promise.scala:55) [scala-library-2.11.6.jar:na]
	at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:153) [scala-library-2.11.6.jar:na]
	at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235) [scala-library-2.11.6.jar:na]
	at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235) [scala-library-2.11.6.jar:na]
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) [scala-library-2.11.6.jar:na]
	at scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:121) [scala-library-2.11.6.jar:na]
	at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [scala-library-2.11.6.jar:na]
	at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [scala-library-2.11.6.jar:na]
	at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [scala-library-2.11.6.jar:na]
	at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [scala-library-2.11.6.jar:na]
Caused by: java.lang.NullPointerException: null
	at scala.collection.mutable.ArrayOps$ofRef$.length$extension(ArrayOps.scala:192) ~[scala-library-2.11.6.jar:na]
	at scala.collection.mutable.ArrayOps$ofRef.length(ArrayOps.scala:192) ~[scala-library-2.11.6.jar:na]
	at scala.collection.IndexedSeqOptimized$class.foldLeft(IndexedSeqOptimized.scala:66) ~[scala-library-2.11.6.jar:na]
	at scala.collection.mutable.ArrayOps$ofRef.foldLeft(ArrayOps.scala:186) ~[scala-library-2.11.6.jar:na]
	at core.DatabaseProcessing$.cropsGenerated(DatabaseProcessing.scala:256) ~[classes/:na]
	at core.DatabaseProcessing$$anonfun$generateBoundingBoxDatabaseImages$1$$anonfun$apply$18.apply(DatabaseProcessing.scala:225) ~[classes/:na]
	at core.DatabaseProcessing$$anonfun$generateBoundingBoxDatabaseImages$1$$anonfun$apply$18.apply(DatabaseProcessing.scala:224) ~[classes/:na]
	at scala.collection.Iterator$class.foreach(Iterator.scala:750) ~[scala-library-2.11.6.jar:na]
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1202) ~[scala-library-2.11.6.jar:na]
	at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) ~[scala-library-2.11.6.jar:na]
	at scala.collection.AbstractIterable.foreach(Iterable.scala:54) ~[scala-library-2.11.6.jar:na]
	at core.DatabaseProcessing$$anonfun$generateBoundingBoxDatabaseImages$1.apply(DatabaseProcessing.scala:224) ~[classes/:na]
	at core.DatabaseProcessing$$anonfun$generateBoundingBoxDatabaseImages$1.apply(DatabaseProcessing.scala:223) ~[classes/:na]
	at scala.util.Success$$anonfun$map$1.apply(Try.scala:236) ~[scala-library-2.11.6.jar:na]
	at scala.util.Try$.apply(Try.scala:191) [scala-library-2.11.6.jar:na]
	at scala.util.Success.map(Try.scala:236) ~[scala-library-2.11.6.jar:na]
	... 8 common frames omitted

If i create the folder <$TIEFVISION_HOME>/resources/bounding-boxes/crops I get the following error:
http://imgur.com/a/DaKo6

It seems that the crop image dataset is not being generated. I followed the developer guide carefully but with no luck. It is hard to see if I am missing something or this is a bug

@ivancruzbht
Copy link
Author

ivancruzbht commented Mar 24, 2017

I just found out the issue, I have to manually create all the dest directories that this endpoint uses, i.e.

tiefvision/resources/bounding-boxes/crops
tiefvision/resources/bounding-boxes/crops/extended
tiefvision/resources/bounding-boxes/scaled-images

For a future feature, it would be nice to have the backend handle all of this, or maybe mention it in the md file :)

@thebearer696
Copy link

Hi @ivancruzbht I am facing an issue that might be related to yours, I created the directories and the endpoint works perfectly (at-least it says) but then upon running the file: encode-training-and-test-images.lua I get the following error log

~/tiefvision/src/torch/models/encoder.model Encoder loaded. nil ~/tiefvision/resources/bounding-boxes/0-train.txt: 0 nil ~/tiefvision/resources/bounding-boxes/1-train.txt: 0 Class 0 with files 0 luajit: bad argument #2 to '?' (out of bounds at ~/torch/pkg/torch/lib/TH/generic/THStorage.c:202) stack traceback: [C]: at 0x7f8ad2c9eb70 [C]: in function '__index' encode-training-and-test-images.lua:66: in function 'encodeData' encode-training-and-test-images.lua:80: in main chunk [C]: at 0x557a42ac5470
What I understand from this is that it is not able to locate 0-train.txt and 1-train.txt but I am unable to generate those. Any sort of help is appreciated.

@neerajvashistha
Copy link

Exactly same thing here 0-train.txt and 1-train.txt are not generated!!!, following the instruction given in developers guide, any help would be appreciated.

Thanks

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

No branches or pull requests

3 participants