I tried to use the AprilTag python code from:

https://github.com/luxonis/depthai-python/tree/main/examples/AprilTag

I printed the tags using a pdf from this link.:

https://docs.cbteeple.com/robot/april-tags

It runs, but I only get a detection on the tag once in a blue moon. I tried several different ones (one per page and two per page) but no difference. When it does detect a tag it returns the correct ID. However, the performance is so bad that I can't use it.

I saw that there are some params you can configure, but I was not sure what to tweak. Any ideas on what could be wrong or how to make it work more consistently? Are the tags I am using correct?

Thanks

  • jakaskerl replied to this.
    • Best Answerset by erik

    Hi DrRoboto ,
    Unfortunately AprilTags just can't run efficiently on RVC2. So for RVC2 we will likely remove them from depthai altogether, and also add support for them in RVC3, which does have quadcore ARM where it can run much more accurately/efficiently.
    Thanks, Erik

    Hi DrRoboto
    Yeah the AprilTags node is still very much work in progress (hence no documentation anywhere). I feel like you will need to run it on host if you wish to get a decent result.

    Thanks,
    Jaka

    Thanks. That is unfortunate. In my lab we use them a lot, and I was hopeful this would be a super easy way to add AprilTag support to even the smallest of our robots. Hopefully they will get this sorted out sooner than later because it is a very useful capability to have.

    • erik replied to this.

      Hi DrRoboto ,
      Unfortunately AprilTags just can't run efficiently on RVC2. So for RVC2 we will likely remove them from depthai altogether, and also add support for them in RVC3, which does have quadcore ARM where it can run much more accurately/efficiently.
      Thanks, Erik

      a year later

      Hey @erik, just wanted to follow up here. Seems like Apriltag detection might still work but isn't "supported"? Is that correct? Or did you completely remove the functionality? I see this thread where you suggest it might still be doable https://discuss.luxonis.com/d/482-apriltag-detection-on-oak-d/3

      But this current thread you seem to suggest not at all.

      If the answer is not at all, is there a way to build custom cpu logic to run on device that isn't a blob ml model?

      Thanks so much

      Follow up: I did get it to run on an RVC2 chip, but the detection rate is essentially non existent. I suppose this is what you meant by "doesn't perform well." By performance, I assumed you meant speed and not accuracy. Experimenting now if I can slow it down to improve performance, but I'm surprised that detection rate is poor on an otherwise crisp image

      Hi @ChristianN ,
      Yeah, both speed/accuracy are quite bad. Hopefully that will change with upcoming RVC4 chip🙂

      Got it, thanks @erik . It's odd, because running the stock apriltag library on host simultaneously get's near perfect detection. Is there a way to compile and run a custom binary onboard that isn't an ml model? Even if I just have 1hz detection with much better accuracy, that would be a big improvement