acmerobotics / ftc-dashboard

React-based web dashboard designed for FTC
https://acmerobotics.github.io/ftc-dashboard
Other
171 stars 129 forks source link

Stream camera view not working with tensorflow #99

Closed wangxdflight closed 1 year ago

wangxdflight commented 1 year ago

I am able to get camera view for opencv (apriltag) and vuforia, but not with tensor flow. Is it supposed to work?

Thanks a lot!

rbrott commented 1 year ago

It should work. To debug, you can try setting a breakpoint in TFObjectDetectorImpl#accept() and seeing if it gets called. You can also try using the DS camera stream preview which relies on many of the same code paths.

wangxdflight commented 1 year ago

Thanks for your reply. It now works. But I had to do code change as below in ConceptTensorFlowObjectDetection.java:

image

wangxdflight commented 1 year ago

Even with changes above, the camera view in dashboard still doesn't show the detection bounding boxes though.

rbrott commented 1 year ago

If I'm reading the source right, more-or-less the same image is shown on the dashboard as is shown on the RC screen. You're free to write your own CameraStreamSource implementation if you want to further manipulate the Bitmap that will be sent.

wangxdflight commented 1 year ago

It works now...Thanks.