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

Please rewrite project to use CocoaPods #22

Open anonym24 opened 6 years ago

anonym24 commented 6 years ago

it would be much easier to install tensorflow using CocoaPods https://www.tensorflow.org/mobile/ios_build

building from source is so much pain (when you don't even have a mac, but use virtual machines)

I tried to change it to CocoaPods by-myself, but as I saw in the project it also needs Google Protobuf files (but this lib is created/downloaded only when building tensorflow ios from source using build script build_all_ios_ssd.sh)

so it would be great to update it to CocoaPods and resolve this issue https://github.com/JieHe96/iOS_Tensorflow_ObjectDetection_Example/issues/11 remove TF-Root from project settings (as we don't need when we have tensorflow from CocoaPods)

anonym24 commented 6 years ago

I tried again to build from source with sh script, finally successful build, using the latest clonned tensorflow but still iOS_Tensorflow_ObjectDetection_Example project needs 3.3.2 protobuf (seems tensorflow use 3.3.0) and some other errors, also nsync is available only at downloads/nsync, but not at gen/nsync (no such folder), in your project settings one lib path is set to $(TF_ROOT)/tensorflow/contrib/makefile/gen/nsync

tensorflow/contrib/makefile/compile_nsync.sh -t ios says that everything is ok (already was built)

anonym24 commented 6 years ago

this time before building I forgot to run ./config.sh but still I don't think I'll get newer google probuf version

anonym24 commented 6 years ago

after your ./config I can't build anymore using next commands:

tensorflow/contrib/makefile/download_dependencies.sh
tensorflow/contrib/makefile/compile_ios_protobuf.sh 
tensorflow/contrib/makefile/compile_ios_tensorflow_s.sh "-O3  -DANDROID_TYPES=ANDROID_TYPES_FULL -DSELECTIVE_REGISTRATION -DSUPPORT_SELECTIVE_REGISTRATION"
tensorflow/core/lib/strings/numbers.cc:26:10: fatal error: 
      'double-conversion/double-conversion.h' file not found
#include "double-conversion/double-conversion.h"
         ^
1 error generated.
make: *** [/Users/admin/tensorflow/tensorflow/contrib/makefile/gen/host_obj/tensorflow/core/lib/strings/numbers.o] Error 1
make: *** Waiting for unfinished jobs....
+ '[' 2 -ne 0 ']'
+ echo 'arm64 compilation failed.'
arm64 compilation failed.
+ exit 1