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

ERROR: Unable to run session Must specify at least one target to fetch or execute. #5

Open
salamanders opened this issue Nov 27, 2018 · 5 comments

Comments

@salamanders
Copy link

Error on small 300x300 png image:

import net.tzolov.cv.mtcnn.MtcnnService
import net.tzolov.cv.mtcnn.MtcnnUtil
import java.io.File
import javax.imageio.ImageIO

fun main() {
    val mtcnnService = MtcnnService()
    val inputImage = MtcnnUtil.to3ByteBGR(ImageIO.read(File("300.png")))
    val faceAnnotations = mtcnnService.faceDetection(inputImage)
    val annotatedImage = MtcnnUtil.drawFaceAnnotations(inputImage, faceAnnotations)
    ImageIO.write(annotatedImage, "png", File("./AnnotatedImage.png"))
}
2018-11-26 16:22:55.679019: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2018-11-26 16:22:55.679279: I tensorflow/core/common_runtime/process_util.cc:69] Creating new thread pool with default inter op setting: 8. Tune using inter_op_parallelism_threads for best performance.
[main] INFO org.nd4j.linalg.factory.Nd4jBackend - Loaded [CpuBackend] backend
[main] INFO org.nd4j.nativeblas.NativeOpsHolder - Number of threads used for NativeOps: 4
[main] INFO org.nd4j.nativeblas.Nd4jBlas - Number of threads used for BLAS: 4
[main] INFO org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner - Backend used: [CPU]; OS: [Mac OS X]
[main] INFO org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner - Cores: [8]; Memory: [3.6GB];
[main] INFO org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner - Blas vendor: [MKL]
Exception in thread "main" java.lang.IllegalStateException: ERROR: Unable to run session Must specify at least one target to fetch or execute.
	at org.nd4j.tensorflow.conversion.graphrunner.GraphRunner.run(GraphRunner.java:525)
	at net.tzolov.cv.mtcnn.MtcnnService.preparationStage(MtcnnService.java:286)
	at net.tzolov.cv.mtcnn.MtcnnService.rawFaceDetection(MtcnnService.java:235)
	at net.tzolov.cv.mtcnn.MtcnnService.faceDetection(MtcnnService.java:164)
	at net.tzolov.cv.mtcnn.MtcnnService.faceDetection(MtcnnService.java:133)
	at MainKt.main(Main.kt:14)
	at MainKt.main(Main.kt)

Process finished with exit code 1
@salamanders
Copy link
Author

Same error on pivotal-ipo-nyse.jpg. Using master-SNAPSHOT

@mhashem
Copy link

mhashem commented Nov 27, 2018

@salamanders what is your setup? OS + version, Java version?

salamanders added a commit to salamanders/bestsmiles that referenced this issue Nov 27, 2018
@salamanders
Copy link
Author

Java: 1.8.0_191
OS: Mac OS X, 10.14.1. x86_64

I uploaded a commit showing the error: https://github.com/salamanders/bestsmiles/tree/85153f1e0ae65c0f241c9cdbef348b3112ddcfb2

@Guppster
Copy link

I have the same issue. @salamanders did you get it working?

@salamanders
Copy link
Author

Unfortunately I never did.

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