forked from csharpseattle/tensorflowiOS
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate string_int_label_map.pb files at build time from proto defin…
…ition using protoc in the tensorflow repo. Add v1.5.0 to README
- Loading branch information
Chris Sharp
committed
Feb 2, 2018
1 parent
b45dc1e
commit 9ff16d3
Showing
10 changed files
with
105 additions
and
2,981 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
.DS_Store | ||
xcuserdata | ||
|
||
string_int_label_map.pb.cc | ||
string_int_label_map.pb.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# Grab the proto definition file from the tensorflow models repository | ||
# | ||
echo "Downloading proto definition from models repo" | ||
curl -s -o /${TMPDIR}/string_int_label_map.proto https://raw.githubusercontent.com/tensorflow/models/master/research/object_detection/protos/string_int_label_map.proto | ||
|
||
# | ||
# Test for existence of the protobuf compiler in the tensorflow repo. | ||
# | ||
if [ ! -f $TENSORFLOW_ROOT/tensorflow/contrib/makefile/gen/protobuf-host/bin/protoc ]; then | ||
echo "protoc not found in Tensorflow repo at tensorflow/contrib/makefile/gen/protobuf-host/bin. Did you set TENSORFLOW_ROOT in tensorflow.xcconfig?" | ||
return 1 | ||
fi | ||
|
||
# | ||
# Generate the string_int_label_map.cc and .h file | ||
# | ||
|
||
|
||
if [ $? == 0 ]; then | ||
echo "Generating string_int_label_map. Output to '$SRCROOT'" | ||
$TENSORFLOW_ROOT/tensorflow/contrib/makefile/gen/protobuf-host/bin/protoc --proto_path=${TMPDIR} --cpp_out=${SRCROOT}/Tensorflow/ string_int_label_map.proto | ||
else | ||
exit 1 | ||
fi | ||
|
||
return $? |
Oops, something went wrong.