tensorflow-yolo-ios
tensorflow-yolo-ios copied to clipboard
Cannot build with my own frozen pb file
Hey, @KleinYuan . Nice work on it :D 👍
There are a couple of things that's sort of an issue to me.
I installed the tensorflow on Ubuntu 16.04 and trained my own model referring https://github.com/tensorflow/models/blob/master/object_detection/g3doc/running_locally.md on this.
After that, expert it to pb file, and replace your 'tiny-yolo-voc.pb', 'vod.txt' with my own 'frozen_inference_graph.pb', 'txt' file.
but i've got error below ... = = = = = = = = = = = = = = = = = = = = /tensorflow-yolo-ios/tensorflow-yolo-ios/tensorflow-yolo-ios/tfWrap.mm:72] Loading model with memory mapped 2017-08-26 02:09:12.685433: E /tensorflow-yolo-ios/tensorflow-yolo-ios/tensorflow-yolo-ios/tensorflow_utils.mm:185] MMap failed with Corrupted memmapped model file: /var/containers/Bundle/Application/F9C63DBE-8A8B-44DB-B131-8C36A8B6F0DA/tensorflow-yolo-ios.app/frozen_inference_graph.pb Invalid directory offset 2017-08-26 02:09:12.685496: I /tensorflow-yolo-ios/tensorflow-yolo-ios/tensorflow-yolo-ios/tfWrap.mm:75] Loaded model with memory mapped 2017-08-26 02:09:12.685523: F /tensorflow-yolo-ios/tensorflow-yolo-ios/tensorflow-yolo-ios/tfWrap.mm:82] Couldn't load model: Data loss: Corrupted memmapped model file: /var/containers/Bundle/Application/F9C63DBE-8A8B-44DB-B131-8C36A8B6F0DA/tensorflow-yolo-ios.app/frozen_inference_graph.pb Invalid directory offset = = = = = = = = = = = = = = = = = = = =
Actually, this model is working properly on Android object detection app. so i'm really confused.
Is there any tips to generate own pb model for this project ?
@BluehackRano Sorry for delay of reply. Was in vacation and had no access to my Mac.
So the problem is as it says, you need to either map your model to memory or turn off the memory map flag in here by changing
memMapped: true
to
memMapped: false
As for how to map graph to memory, check here: https://petewarden.com/2016/09/27/tensorflow-for-mobile-poets/
do:
bazel build tensorflow/contrib/util:convert_graphdef_memmapped_format
bazel-bin/tensorflow/contrib/util/convert_graphdef_memmapped_format \
--in_graph=/tf_files/rounded_graph.pb \
--out_graph=/tf_files/mmapped_graph.pb
@BluehackRano Any follow up man?