JieHe96 / iOS_Tensorflow_ObjectDetection_Example

An iOS application of Tensorflow Object Detection with different models: SSD with Mobilenet, SSD with InceptionV2, Faster-RCNN-resnet101

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TensorFlow iOS Build

lucasjinreal opened this issue · comments

Hi, it seems there are no build_ios_ssd.sh but just build_ios.sh exist. How do I follow your instructions to do this thing. Many thanks if got any apply.

in tensorflow-master/tensorflow/contrib/makefile/ there is build_all_ios_ssd.sh,check tensor flow version first before bash the .sh

I am running on tensorflow 1.4, which is build wrong. I opened a issue in tensorflow: topic, they claimed that there are no such file at all. I cloned tensorflow repo, it has this file but build faild. the error says:

In file included from tensorflow/core/lib/db/sqlite.cc:17:
./tensorflow/core/lib/io/record_reader.h:83:19: error: use of undeclared identifier
      'InputStreamInterface'
  std::unique_ptr<InputStreamInterface> input_stream_;
                  ^
1 error generated.
make: *** [/Volumes/xs/CodeSpace/ng/ai/frameworks/tensorflow/tensorflow/contrib/makefile/gen/obj/ios_ARM64/tensorflow/core/lib/db/sqlite.o] Error 1
make: *** Waiting for unfinished jobs....
+ '[' 2 -ne 0 ']'
+ echo 'arm64 compilation failed.'
arm64 compilation failed.
+ exit 1

the build_all_ios_ssd.sh is a file created by myself, if you want to compile it, you need to download this example and compile the "config.sh" in the example by typing

bash config.sh

Then you should be able to compile the dependencies correctly.
If you already compiled the dependencies such as "build_all_ios.sh" before, remove the following three folders and try recompile the dependency:

tensorflow-master/tensorflow/contrib/makefile/bin
tensorflow-master/tensorflow/contrib/makefile/dep
tensorflow-master/tensorflow/contrib/makefile/lib

@jinfagang

I'll take a try, thanks advance.

Runed the config.sh:

➜  config git:(master) ✗ bash config.sh 
ok=> current version: # Release 1.4.0
ok=> Ready!

then ./tensorflow/contrib/makefile/build_all_ios_ssd.sh , still got this error:

./tensorflow/core/lib/io/record_reader.h:83:19: error: use of undeclared identifier
      'InputStreamInterface'
  std::unique_ptr<InputStreamInterface> input_stream_;
                  ^
1 error generated.
make: *** [/Volumes/xs/CodeSpace/ng/ai/frameworks/tensorflow/tensorflow/contrib/makefile/gen/obj/ios_ARM64/tensorflow/core/lib/db/sqlite.o] Error 1
make: *** Waiting for unfinished jobs....
+ '[' 2 -ne 0 ']'
+ echo 'arm64 compilation failed.'
arm64 compilation failed.
+ exit 1

what step did I missed?

JieHe96, can you make build_all_ios_ssd.sh support armv7 & armv7s.
And I also have a question, why tensor flow git has build_all_ios_ssd.sh several days ago ,but this file disappear now?

@hzhou81 I think 1.4 version delete this.

just do:

git checkout v1.4.0-rc0

in tensorflow cloned directory before following the tutorial

worked for me

thanks @hexenskull

you can use my clone of tensorflow v1.4.0-rc0, I make a little modification that everyone can use it to build iOS tensorflow with armv7,armv7s,arm64,i386,x86_64 supported.