Closed
Description
I want build TensorFlow Android Camera Demo using a custom classifier following this tutorial.
When I build the app using bazel build //tensorflow/examples/android:tensorflow_demo
I get:
CONFLICT: asset:WORKSPACE is provided with ambiguous priority from:
external/mobile_multibox/WORKSPACE
external/inception5h/WORKSPACE
CONFLICT: asset:WORKSPACE is provided with ambiguous priority from:
external/stylize/WORKSPACE
external/mobile_multibox/WORKSPACE
Thanks in advance!
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
andrewharp commentedon Feb 10, 2017
@davideb91 That article is somewhat outdated. The model files are now downloaded automatically by Bazel, which is why you're getting conflicts with the manually downloaded ones. You can either delete the files from assets/, or remove the dependencies on the file archives in the tensorflow/examples/android/BUILD file.
davideb91 commentedon Feb 10, 2017
Thanks @andrewharp , it works now!
However when I try to open the app on my android phone it is terminated.
To build the app I ran
in order to optimize my graph, and I copied retrained_label.txt in /android/assets/ .
Then I added these line in /tensorflow/tensorflow/examples/android/src/org/tensorflow/demo/TensorFlowImageClassifier.java
And I removed other dependencies on the file archives in the tensorflow/examples/android/BUILD file:
When I build my app with
bazel build //tensorflow/examples/android:tensorflow_demo
, it works correctly, but when I try to open the app on my phone, it gives error and is terminated.Do you have any suggestion please?
Thank you very much!
andrewharp commentedon Feb 10, 2017
@davideb91 What does adb logcat say?
davideb91 commentedon Feb 11, 2017
@andrewharp This is the output of adb logcat:
andrewharp commentedon Feb 11, 2017
Is the label file actually in your assets folder?
davideb91 commentedon Feb 13, 2017
@andrewharp In asset folder (tensorflow/tensorflow/examples/android/asset) there are only label and graph file of my retrained model, and I haven't found any file named imagenet_comp_graph_label_strings.txt in tensorflow/*.
With a grep command I found the string ("imagenet_comp_graph_label_strings.txt") in these files:
tensorflow/tensorflow/java/src/main/java/org/tensorflow/examples/LabelImage.java
tensorflow/tensorflow/core/kernels/hexagon/hexagon_graph_execution_test.cc
tensorflow/tensorflow/contrib/ios_examples/.gitignore
tensorflow/tensorflow/contrib/ios_examples/benchmark/benchmark.xcodeproj/project.pbxproj
tensorflow/tensorflow/contrib/ios_examples/simple/tf_ios_makefile_example.xcodeproj/project.pbxproj
tensorflow/tensorflow/contrib/ios_examples/camera/camera_example.xcodeproj/project.pbxproj
tensorflow/tensorflow/contrib/pi_examples/label_image/label_image.cc
tensorflow/tensorflow/contrib/pi_examples/.gitignore
tensorflow/tensorflow/contrib/pi_examples/camera/camera.cc
tensorflow/tensorflow/examples/label_image/main.cc
tensorflow/tensorflow/examples/android/src/org/tensorflow/demo/ClassifierActivity.java
Could one of these files be the problem?
davideb91 commentedon Feb 13, 2017
Solved!
Problem was in
tensorflow/tensorflow/examples/android/src/org/tensorflow/demo/ClassifierActivity.java
I had to set dependencies to my model.
Thanks Andrew for help
andrewharp commentedon Feb 13, 2017
Great!
AnSharypov commentedon Feb 18, 2017
@davideb91 I heave the same problem. Can you please say - which dependencies you set?
davideb91 commentedon Feb 20, 2017
@AnSharipov I set these dependencies in
tensorflow/tensorflow/examples/android/src/org/tensorflow/demo/ClassifierActivity.java
:abhigoku10 commentedon Oct 17, 2017
@davideb91 can u pls explain what are these parameters and how to set these values , since i have trained the model in darknet and converted using darkflow
private static final int IMAGE_MEAN = 128;
private static final float IMAGE_STD = 128;
private static final String INPUT_NAME = "Mul:0";
private static final String OUTPUT_NAME = "final_result:0";
sepulm01 commentedon Jun 23, 2018
Hi @davideb91 and @andrewharp
I'm working in a street object clasification project. I would like to know if the performance is better if I'll train only a few categories (cars, trucks, bus, pedestrian...) than use a COCO .pb database. Do you test it ? Best regards.
Martin
SheezaShabbir commentedon Jul 5, 2018
Gyz I also working on the same project with same model but my own dataset. But facing same error.My app is running but not giving labeling for the images.Do not know what to do. Please help... I also change dependencies as given above but its not working.