CodeProject.AI Version 2.9.0

Thanks for the reply.

I'm running CPAI in a docker container on Unraid. Did try a complete reïnstall with the 2.9.X versions, but this did not help.

Also tried modifying the modulesettings.json, to add the 2.9.X version which I was installing. But this didn't help either.

Currently wondering what the state of google coral support is? There does not seem to be a lot of activity there.
Not much support, unfortunately. I have a working branch for some changes to support more models on more TPUs and make it faster here:

But the GitHub pull request has been sitting in limbo since June and has accumulated the alpha version of some new features:
  • OpenCV image scaling
  • Numba JIT compilation
  • Hosting models on Hugging Face
  • Testing MD5 file hashes for models
  • YOLOv9
  • Faster

I’d be happy to approve any pull requests if anyone wants to get things working the rest of the way in CPAI. I’ve been busy with other projects and haven’t had time to put into this. It mainly just needs testing and getting things figured out with the HF model downloads.

You can see the framerate I’ve gotten with various files and TPU counts in the options.py file in that branch.

Edit: Google hasn’t been doing well supporting the Coral TPU.
If the problem is that the Coral driver is too old and incompatible with current libraries, there is an updated repo to build from. He has done a good job of it:
GitHub - feranick/libcoral: C++ API for ML inferencing and transfer-learning on Coral devices
GitHub - feranick/libedgetpu: Source code for the userspace level runtime driver for Coral.ai devices.
GitHub - feranick/pycoral: Python API for ML inferencing and transfer-learning on Coral devices

I don't know if it will make things more stable and less of a pain, but it's unlikely to be worse...
 
Not much support, unfortunately. I have a working branch for some changes to support more models on more TPUs and make it faster here:

But the GitHub pull request has been sitting in limbo since June and has accumulated the alpha version of some new features:
  • OpenCV image scaling
  • Numba JIT compilation
  • Hosting models on Hugging Face
  • Testing MD5 file hashes for models
  • YOLOv9
  • Faster

I’d be happy to approve any pull requests if anyone wants to get things working the rest of the way in CPAI. I’ve been busy with other projects and haven’t had time to put into this. It mainly just needs testing and getting things figured out with the HF model downloads.

You can see the framerate I’ve gotten with various files and TPU counts in the options.py file in that branch.

Edit: Google hasn’t been doing well supporting the Coral TPU.
If the problem is that the Coral driver is too old and incompatible with current libraries, there is an updated repo to build from. He has done a good job of it:
GitHub - feranick/libcoral: C++ API for ML inferencing and transfer-learning on Coral devices
GitHub - feranick/libedgetpu: Source code for the userspace level runtime driver for Coral.ai devices.
GitHub - feranick/pycoral: Python API for ML inferencing and transfer-learning on Coral devices

I don't know if it will make things more stable and less of a pain, but it's unlikely to be worse...
is there a ready to run version? i want to try it :)
 
  • Like
Reactions: mailseth
is there a ready to run version? i want to try it :)
You would need to check out the code from my fork (‘git clone git@github.com:seth-planet/CodeProject.AI-ObjectDetectionCoral.git’ and ‘git checkout fix_single_fallback’). And then make a few changes in the code to get it running. I basically see three things to work on:
  • File downloading from HF. I expect we can download each model as-needed from HF and save a pile of bandwidth fees. They host models for free. We need to figure out that workflow within the code, as the latest options.py file has both the file name and MD5 hash. So we need to get that up and running correctly.
  • Validate the install process for new components or create a fallback for things like OpenCV and Numba. Hopefully this is as simple as adding them to requirements.txt.
  • Send me exceptions that you are seeing thrown and from where from flakey TPU(s). I can work on catching & handling them appropriately. I think we should be able to fall back to the CPU elegantly with the existing code, but I don't really know where to start and haven't tested it.
  • Bonus work: Are we using the right version of the Coral driver? Should we compile a new one? Are we compatible with the existing one?

Unfortunately, I don’t think I’m able to give a good guide on getting this up and running on your computer. You may be able to follow a similar guide from a different module somewhere? Also, like I mentioned, it will require some reworking of the code. I’m happy to help with what I can, but you’ll be thrown into the deep end for a lot of debugging. I’m happy to accept a Pull Request or even a ‘git diff’ of something simple. To get it up and running, you’d basically only need to figure out how to get the models downloaded & saved as needed from HF.
 
Hello, I have updated to 2.9.5 and the license plate reader is no longer reading out plates and just giving the occasional DayPlate. I kept my settings to mark plates as: * and objects:0,alpr