Comments (14)
It seems the tensorFlowOutput array doesn't have the element which you want to access. Could you please put a brakepoint in the line 82 of the YOLOClassifier and check the size of the tensorFlowOutput array?
Does your retrained modell recognize your classes with darkFlow or darkNet?
from android-yolo-v2.
Hi @szaza
Of course, when I tested in darknet and darkflow, the re-trained pb file was successful.
The size of the tensorFlowOutput array is 3549
Do you have any problems ?
from android-yolo-v2.
No, I did not have similar problems so far.
How many classes do you have?
from android-yolo-v2.
I have two classes
from android-yolo-v2.
Is there a problem with my pb file?
from android-yolo-v2.
Unfortunately, I did not have time to check your file, I'm just thinking what could be the problem.
I don't think so that you have problems with your protobuff file.
Did you use the tiny-yolo model from the https://pjreddie.com/darknet/yolov2/, which requires a 416X416x3 long input?
from android-yolo-v2.
@szaza
I modified the tiny-yolo model to 270X360X3
from android-yolo-v2.
Ok, then the INPUT_SIZE should be modified in the Config.java. The size of the standard tiny-yolo-v2 is 416x416x3, so please create an INPUT_WIDTH and INPUT_HEIGHT constant in the Config.java and change every places in the code where the INPUT_SIZE is used: e.g. here;
from android-yolo-v2.
I received your opinion, but the result was the same error.
from android-yolo-v2.
Could you check the size of the tensorFlowOutput after these changes?
You can also try to decrease the number of the cells, by modifying the SIZE in the YOLOClassifier.java.
By default the tiny-yolo-v2 uses 13x13 cells and the size of the tensorflow output should be 13x13x5x(NR_OF_CLASSES + 5);
from android-yolo-v2.
The length of tensorFlowOutput was still 3549.
I created the weight file by referring to the site below.
https://github.com/unsky/yolo-for-windows-v2
I also created a pb file by referring to the following site
https://github.com/thtrieu/darkflow
Is there a problem with my pb file?
When testing with the webcam, the results were successful.
But I do not know why it does not work on Android phones.
And when I create a pb file using darkflow, does the Tensorflow version work?
Here is the error that appears after changing INPUT_SIZE
I would be so grateful if you give me some advice
E/AndroidRuntime: FATAL EXCEPTION: inference
Process: org.tensorflow.yolo, PID: 7539
java.lang.ArrayIndexOutOfBoundsException: length=3549; index=3549
at org.tensorflow.yolo.YOLOClassifier.getModel(YOLOClassifier.java:88)
at org.tensorflow.yolo.YOLOClassifier.classifyImage(YOLOClassifier.java:71)
at org.tensorflow.yolo.TensorFlowImageRecognizer.recognizeImage(TensorFlowImageRecognizer.java:52)
at org.tensorflow.yolo.view.ClassifierActivity.lambda$onImageAvailable$1$ClassifierActivity(ClassifierActivity.java:109)
at org.tensorflow.yolo.view.ClassifierActivity$$Lambda$1.run(Unknown Source:0)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
from android-yolo-v2.
This implementation works with the standard parameters of the YoloV2, so in case if you change it's parameters, you have to change the parameters inside the implementation as well.
Here you can find a description about how I trained my models: https://sites.google.com/view/tensorflow-example-java-api/complete-guide-to-train-yolo;
from android-yolo-v2.
@szaza
I finally succeeded.
Thank you for your help.
I wish you all good
from android-yolo-v2.
I'm glad to hear from you that you managed to solve the problem. I wish all the best for your project!
from android-yolo-v2.
Related Issues (20)
- About misjudgment measures HOT 6
- Black Screen HOT 2
- Do you have no intention of making android-yolo-v3? HOT 2
- Crashing when using yolo v2 HOT 1
- How do I convert my yolov3 weights file to .pb? HOT 2
- java.lang.StackOverflowError: stack size 8MB
- App crash on the simulator HOT 2
- GPU support for android HOT 1
- .tflite HOT 1
- Not getting predictions for custom model. HOT 1
- use new pb file problem.
- Unable to load the pb file from Custom training model HOT 16
- Node Output does not exist in model HOT 4
- different input size not working HOT 1
- The problem about app‘s interface HOT 5
- Is there any way to use it for Yolov3 till now in 2020? HOT 1
- Unable to locate .pb file in custom model
- Can't Compile it
- Unable to find method 'org.gradle.api/Lorg/gradle/api/tasks/TaskInputs;'.
- Add more feature for Camera Capture HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-yolo-v2.