Creating April Tag

Hello I am trying to track April Tags with OAK-D-Lite and RPi4 using a PyTorch Model. The reason I would like to use PyTorch instead of OpenCV is OAK-D-Lite requires it own unique file type which I can convert to from PyTorch model (Run your own CV functions on-device — DepthAI documentation | Luxonis). The RPi4 is to slow only able to track at around 20FPS the goal is to be closer to 60FPS. Any suggestions on how I should go about this? My best guess right now is to dig through April tags C code (located GitHub - AprilRobotics/apriltag: AprilTag is a visual fiducial system popular for robotics research.) and change it to PyTorch.