Mason Buchanan

Greenhorn
+ Follow
since Apr 16, 2021
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
7
Given in last 30 days
2
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mason Buchanan

In essence, the image resolution that my camera takes and the image resolution that is displayed on the application are two different sizes. I aim to know how to find them (and move forward in resolving this issue).
1 week ago
I have built an application (in Java, for Android) using this CameraX documentation. However, because of issues with the image resolution, I am currently attempting to figure out the size of the image resolution displayed by my application. I have used the getResolutionInfo from this documentation in order to resolve this issue. Here is how the method looks, as I want to print the size of the image resolution in my Logcat;



For convenience, here is the method in context of my entire MainActivity.java class, with the aforementioned method starting at Line 183;

1 week ago
@Norm Radder, Line 123 of the following code is where the Rect is called and created. I was originally only going to put in that method only. However, I find that including everything first and isolating the root of the problem later can help. So here it is. Also, since you said the x values are ok, and y values aren't looking so good, how would I fix that?

2 weeks ago
My application uses Google ML to detect objects by drawing rectangles (BoundingBox) around the object it detects. However, this
 is what it ends up looking like. The problem is that the rectangle is drawn above the object it's suppose to be drawn around. It's come to my attention that the focus is on the code and not on the library.

I've built this application using this CameraX documentation to build the camera stream preview from my device camera. I then used this Google ML documentation to get the application to build and track objects. However, it's come to my attention that I'm drawing the rectangles wrong, and I wish to know how exactly I can resolve that. I will provide the code for my DrawGraphic.java class and my MainActivity.java class. Any further information needed to supplement the question can be provided upon request!

Here is the DrawGraphic.java class that draws the rectangle;


2 weeks ago
Any indication of what other resource may be able to help me on this would be much obliged.
1 month ago
I figure that based on the image provided, I have drawn my coordinates wrong. Which brings up the question on how I'd be able to resolve this.
1 month ago
I am currently working on an object detection application for Android (written in Java) that uses Google ML. The application essentially focuses on drawing boundingBoxes around detected objects within a live streamed preview, provided by my device camera (via CameraX). To construct the base of this application, I used this CameraX documentation to build my camera view, and then this Google ML documentation.

But back to my issue in question; Here is what my application looks like when it detects an object. Excuse the fact that it's labelled as a letter opener. My biggest concern lies with how this issue can be resolved. It seems to be missing its detect object by a noticeable amount.

Here's the DrawGraphic java file that I used to draw the boundingBox:



Any further information required to supplement this question will be provided upon request.
1 month ago
If it helps, the exact TensorFlow Lite model that I'm using is called "mobilenet_v1_0.75_192_quantized_1_metadata_1.tflite"
1 month ago
I'm currently working on an Android application (written in Java) using Google ML and TensorFlow. The application is centered around object detection during a live camera stream using the device camera, and uses a TensorFlow Lite model as a custom library to source file lists from. My issue is that I ran the application to see if it would print the list size, and the application launches just fine; camera preview works, app doesn't crash. However, I'm only to be met with this error;

Logcat:


According to my research, some results state that that the file path or root is flawed in some capacity. However, I have the .tflite model placed within my asset folder, which leads me to wonder why exactly I'm receiving these errors and how I can work on resolving them. My Log.d("TAG", "onSuccess" + detectedObjects.size()); in my code below is supposed to print the object list size, but is clearly not.

MainActivity.java:


Also, just for clarification, my application name is ObjectDetection, this would be the file path of just how the .tflite model is placed within my asset folder; ObjectDetection > app > src > main > assets > ClassifierModel.tflite
1 month ago
@RobSpoor

My goodness, you are absolutely right! This following line is not the correct class name at all:



This following line is the correct class name:



which leads me to wonder where this class is currently being called from? Hopefully, when I know this I can then answer your second question as well.
2 months ago
I'm currently working on a Google ML application (in Java) for Android. The application aims to detect objects in real time camera view provided by the device camera. This is a single activity application, however, two additional classes (GraphicOverlay.java & RectOverlay.java) were added to draw the graphic overlay for the boundingBoxes.

Upon running the application, it immediately shut down after displaying on my device for approximately 2 seconds. I've attempted to find ways to resolve the error, but none that fit this error specifically . Here is my code;

Logcat:


activity_main.xml:


Any additional information required to supplement this question shall be provided upon request.
2 months ago
Another update; I have added the following code within the onSuccess method using this StackOverflow answer in order to attempt to draw an overlay within my application display, and wonder why this attempt has not been successful?

3 months ago
If I was using java.awt.Image, I'd create a createGraphics() image from Graphics2D object and then draw on that. However, this is not the case. I'm using a android.media.Image, and so I'm unaware on how to draw a graphic overlay on my input image. If anybody could provide any assistance, it would be much appreciated.
3 months ago
Here is an updated attempt; I have used this example from Google Codelabs that demonstrates how one would use a facial feature detection dependency from Google ML to draw a rectangular box around the detected face. This is the part of code that was of interest to my problem;



I had attempted to use it as reference to draw a box around detected objects in the same way only to no avail. However, I have learned that I must draw the graphic overlay in order for the results to be displayed on the application. Perhaps I should have reworded this question to "How to draw overlay using Google ML?"
3 months ago
I am currently working on an object detection application (written in Java) on Android that uses Google ML Kit to detect objects within a live streamed camera preview. My issue today lies with WHY exactly the code needed to display a boundingBox around the detected object isn't appearing within my display.

The application successfully launches and I see camera preview stream is visible, the only issue is that it is unable to display boundingBox Rectangle around the detected objects, despite code being put in place to implement this. The application itself is able to detect objects, it's merely the visual display that is missing. My code displayed below states the box, and I understand that I must draw the boundingBox myself, and my question is specifically aimed at how I would go about trying to draw it. It is a single activity application:



Any information needed to supplement this question will be provided upon request.
3 months ago