Wie integriere ich ein Objekterkennungsmodell mit Augmented Reality (AR) in Android?Android

Forum für diejenigen, die für Android programmieren
Anonymous
 Wie integriere ich ein Objekterkennungsmodell mit Augmented Reality (AR) in Android?

Post by Anonymous »

Ich arbeite an einer Android-Anwendung, bei der ich ein Objekterkennungsmodell mit Augmented Reality (AR) integrieren möchte. Mein aktuelles Setup funktioniert gut mit einer normalen CameraX-Implementierung. Es fällt mir jedoch schwer, es an AR anzupassen.
Das habe ich:

Code: Select all

•   Object Detection Model: A TensorFlow Lite (TFLite) model that provides bounding box values for each input frame (in pixel coordinates).
•   Output: The bounding box coordinates (top, bottom, left, right) and a confidence score for detected objects in the camera frame.
Problem:
Da die Modellausgabe rahmenbasiert (2D) ist, kann ich die Begrenzung nicht abbilden Kästchen in reale Koordinaten in AR umwandeln. Ich benötige, dass die Begrenzungsrahmen in der AR-Szene korrekt positioniert und an den erkannten Objekten in der realen Welt ausgerichtet sind.
Was ich versucht habe:

Code: Select all

•   Displaying bounding boxes on a CameraX preview — works perfectly.
•   Using Sceneform and ARCore to overlay 3D objects, but I can’t figure out how to map the bounding box from the model to AR coordinates.
Meine Fragen:

Code: Select all

1.  How can I map the 2D bounding box (frame coordinates) to 3D world coordinates in AR?
2.  Are there any libraries or tools that simplify this process?
3.  Should I use anchors or some other ARCore functionality to achieve this?
Zusätzliche Informationen:

Code: Select all

•   Tools: ARCore, TensorFlow Lite, CameraX
•   Goal: To accurately display the detected object’s bounding boxes in the AR world, so they appear at the correct position relative to the real-world object.
Jede Anleitung, Codeausschnitte oder Beispiele wären sehr dankbar!

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post