Closed ramarajan09 closed 7 years ago
Hello, The yolo v2 model has a different output layer (and input) than the yolo v1 voc that I am using. This means that just replacing the .pb file will not work. Also your error tells me that some of the operations in your pb file are not supported by tensorflow mobile.
I will be updating the code these next two months to use yolo v2. You can also try to do it on your own by: -adapting the input size -adapting the output c++ cod -adapting the java code that makes sense of the output of the model -figuring out a way to make the ops work with tensorflow mobile
Good luck!
Now yolo v2 model is supported ?
@natanielruiz Is yolo v2 support ready?
I'm trying to do the same. Did you manage to get this to work? / How far did you get? When I replaced the .pb file with one I created using https://github.com/thtrieu/darkflow, the app immediately crashed, even using yolov1 weights. Both when using yolov1 weights and v2 weights to generate the .pb file, I received the error:
A/native: tensorflow_jni.cc:140 Could not create TensorFlow Graph: Not found: Op type not registered 'RealDiv'
A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 14281 (ImageListener), pid 14254 (.tensorflowdemo)
Hi,
I believe the pb file you derived is for yolo-voc, however, I would like to have a pb file for YOLOv2 608x608 ( https://pjreddie.com/darknet/yolo/).
Use darkflow (https://github.com/thtrieu/darkflow) I was able to create a pb file using yolo.cfg and yolo.weights.
I copied the yolo.pb file into the assets folder and when I try to install the apk, I get the following error:
03-31 16:08:26.398 19432-19652/org.tensorflow.tensorflowdemo I/tensorflow: CameraConnectionFragment: Opening camera preview: 480x640 03-31 16:08:26.402 19432-19432/org.tensorflow.tensorflowdemo V/BoundingBox: width: 1080.0 height: 1794.0 03-31 16:08:26.415 19432-19652/org.tensorflow.tensorflowdemo I/tensorflow: CameraConnectionFragment: Getting assets. 03-31 16:08:26.415 19432-19652/org.tensorflow.tensorflowdemo I/native: tensorflow_jni.cc:115 Loading TensorFlow. 03-31 16:08:26.415 19432-19652/org.tensorflow.tensorflowdemo I/native: tensorflow_jni.cc:117 Making new SessionOptions. 03-31 16:08:26.415 19432-19652/org.tensorflow.tensorflowdemo I/native: tensorflow_jni.cc:120 Got config, 0 devices 03-31 16:08:26.417 19432-19652/org.tensorflow.tensorflowdemo I/native: tensorflow_jni.cc:123 Session created. 03-31 16:08:26.417 19432-19652/org.tensorflow.tensorflowdemo I/native: tensorflow_jni.cc:126 Graph created. 03-31 16:08:26.417 19432-19652/org.tensorflow.tensorflowdemo I/native: tensorflow_jni.cc:130 Acquired AssetManager. 03-31 16:08:26.417 19432-19652/org.tensorflow.tensorflowdemo I/native: tensorflow_jni.cc:132 Reading file to proto: file:///android_asset/yolo.pb 03-31 16:08:26.797 19432-19652/org.tensorflow.tensorflowdemo I/native: stat_summarizer.cc:33 StatSummarizer found 349 nodes 03-31 16:08:26.798 19432-19652/org.tensorflow.tensorflowdemo I/native: tensorflow_jni.cc:137 Creating session. 03-31 16:08:26.827 19432-19652/org.tensorflow.tensorflowdemo A/native: tensorflow_jni.cc:140 Could not create TensorFlow Graph: Not found: Op type not registered 'RealDiv' 03-31 16:08:26.834 19432-19652/org.tensorflow.tensorflowdemo A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 19652 (ImageListener) 03-31 16:08:26.834 368: 368 W/ ] debuggerd: handling request: pid=19432 uid=10094 gid=10094 tid=19652