JieHe96 / iOS_Tensorflow_ObjectDetection_Example

An iOS application of Tensorflow Object Detection with different models: SSD with Mobilenet, SSD with InceptionV2, Faster-RCNN-resnet101
128 stars 28 forks source link

TensorFlow iOS Build #12

Closed lucasjinreal closed 7 years ago

lucasjinreal commented 7 years ago

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.

hzhou81 commented 7 years ago

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

JieHe96 commented 7 years ago

screen shot 2017-10-17 at 12 24 27 pm

lucasjinreal commented 7 years ago

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
JieHe96 commented 7 years ago

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

lucasjinreal commented 7 years ago

I'll take a try, thanks advance.

lucasjinreal commented 7 years ago

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?

hzhou81 commented 7 years ago

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?

lucasjinreal commented 7 years ago

@hzhou81 I think 1.4 version delete this.

pavlobu commented 7 years ago

just do:

git checkout v1.4.0-rc0

in tensorflow cloned directory before following the tutorial

worked for me

lucasjinreal commented 7 years ago

thanks @hexenskull

hzhou81 commented 7 years ago

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.

hzhou81 commented 7 years ago

https://github.com/hzhou81/tensorflow.git