CodeProject.AI Version 2.0

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,041
Reaction score
48,819
Location
USA
BTW, here is a standard example that I see a lot... BI chooses the closest to the middle even though it can't read the plate.
View attachment 153047

Whereas this was available to use...

View attachment 153048
Yeah, parked cars are a b!+ch LOL. Mine hums along pretty good until someone decides to park on the street.

Do you have it set up to ignore static objects?

You may need to work on getting a focus a little closer like the first image?
 

sp3ctre

Getting the hang of it
Joined
Sep 29, 2018
Messages
53
Reaction score
28
Location
UK
Yeah, parked cars are a b!+ch LOL. Mine hums along pretty good until someone decides to park on the street.

Do you have it set up to ignore static objects?

You may need to work on getting a focus a little closer like the first image?
it happily ignores the parked cars, that’s not the problem. The issue is near the centre things are moving across the scene fast. Where the second plate is, the plate is moving toward or away from the camera and so the images are generally better. If the “plate” with the highest % was chosen each time I’d be getting fantastic results.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,041
Reaction score
48,819
Location
USA
I think it is more a focus issue as you should be running a fast enough shutter to eliminate blur due to motion.

That plate gets clear at about the distance the parked car is and that tells me that is the distance the focus is "focused" on.

When we have to optically zoom in like we do for plates, the area of focus gets smaller and it is not an infinity focus, so objects closer or further away from the focus distance will be blurry. It is a well documented "phenomenon" in various threads on this forum. It is just an issue we have to deal with for LPR.

In my example image, the focus number is a 10 point across that image. I would suspect yours is similar. So I took the average focus number to try to maximize my chance of reading a plate across the entire image.

1675531252394.png

Another thing could be if you are not running a fixed shutter it could be blurring as the shutter speed changes due to the light difference when a car comes by. So if you are on auto shutter or a range, try a fixed shutter of 1/2,000 or 1/4,000 during the day and see if that fixes it. If not, then it is the focus.
 
Last edited:

truglo

Pulling my weight
Joined
Jun 28, 2017
Messages
275
Reaction score
103
I'm in sp3ctre's camp. My dahua hfw5231ep-z12 tends to resolve slightly better at night when plates traveling left to right are on the edge of the frame. The reason why is one of the tail lights will be out of frame, resulting in much better characters than when both tail lights are visible (due to backlight conditions). It's all the way zoomed in and ~90' away, so no diff in focus across the frame. It's been setup like that for a many years without problems. So far it seems BI hasn't damaged it with the latest changes. I still think it should use ocr percent personally... anything else is flipping a coin/edge use case I think.
 
Last edited:

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,041
Reaction score
48,819
Location
USA
Anything is possible, but most here, especially with a camera zoomed all the way in, has shown that the area of focus is a lot smaller and not focused for the entire frame and will result in blurry elsewhere. Now whether it is enough to worry about is another story.

I suggest you have someone go out and stop at say three locations (left, right, and middle) and then focus and I suspect you will see the focus number will be different for each one. Make sure you set the step count for the focus to 1 because if it is on the default 20, then it won't show you the focus number changing a few numbers unless it is more than a 10 step difference.

We have several threads scattered throughout that shows this. Folks have even put reflective tape on either side of the road to demonstrate how depending on where you set the focus, the areas outside of that could be out of focus. It is why for LPR we say to have someone stop a car in the ideal area you want to get a capture and get the focus number in the 1step range to get a good number.

You then need to decide which one is the one you want to get the clean focus or average the focus numbers of the 3 spots and then recognize it won't be clean and crisp everywhere, but may be readable from more distances.

Even with my tight image where a car is in and out of the frame in under 0.5 seconds, as it gets close to and outside the red box, it gets blurry. The focus numbers starting top right corner to center to bottom left corner were different by 10 steps. So I can either go with the clear focus step in the center and can still read the plates outside of that, but they will be a little blurry or do an average of the focus number and maybe be a little blurry across the image but still readable.

1675531552906.png
 
Last edited:

truglo

Pulling my weight
Joined
Jun 28, 2017
Messages
275
Reaction score
103
I was thinking exactly that... if it is possible to pick multiple ways, then hopefully some settings can be added for flexibility. That's the best way for BI to ensure all needs are met... lpr is finnicky and the more ingredients we have to mix in, the more likely we are to achieve the result we are after. It would be great if there was like a line you could draw, and plates closest to that line are used... OR turn the line off and just use percent... or use some combo of both idk.
 

AlphaBlueIris

Getting the hang of it
Joined
Jan 17, 2022
Messages
125
Reaction score
27
Location
Boston
@gwithers, thanks I will try to install on a Linux VM because it is not working on the Windows10 VM, I tried to VMs with the same error. Do I need to install nvidia drivers on Linux or it already has them? I have some knowledge of Linux to play around but not an expert.
 

AlphaBlueIris

Getting the hang of it
Joined
Jan 17, 2022
Messages
125
Reaction score
27
Location
Boston
Hopefully this post does not get buried in other posts :) I installed 2.02 beta and it is working great so far. No Hight CPU and etc. CodeProject can see the plates within BlueIris.
Is this the right setup to see the license plates as well as cars and people?
 

Attachments

gwithers

Getting the hang of it
Joined
May 18, 2016
Messages
49
Reaction score
38
@gwithers, thanks I will try to install on a Linux VM because it is not working on the Windows10 VM, I tried to VMs with the same error. Do I need to install nvidia drivers on Linux or it already has them? I have some knowledge of Linux to play around but not an expert.
For CUDA acceleration you will need to install Nvidia drivers (which includes CUDA as we think of it for Windows). You might want to get it working with just the CPU version first to confirm you can get the container running and then try it with GPU acceleration. I will post the command I use for running the docker container.
 

gwithers

Getting the hang of it
Joined
May 18, 2016
Messages
49
Reaction score
38
Use this code to run the latest CPU version of the container. It sets it up to start automatically if the VM restarts, assigns the human readable name "CodeProject.AI-Server" to the instance of the container, and also properly mounts the necessary folders to allow for module download and installation. I should note that you will need to go into the Linux VM and create these "target" folders before the container will run without generating errors.

To create the folders use this code
Code:
sudo -i (input root password when asked)
cd /
cd /etc
mkdir codeproject
mkdir /codeproject/ai
cd /
cd /opt
mkdir codeproject
mkdir /codeproject/ai
Code:
docker run --restart unless-stopped --name CodeProject.AI-Server -d -p 32168:32168 --mount type=bind,source=/etc/codeproject/ai,target=/etc/codeproject/ai --mount type=bind,source=/opt/codeproject/ai,target=/app/modules codeproject/ai-server
Use this code to stop the container
Code:
docker stop CodeProject.AI-Server
Use this code to remove the container to allow you to run it again after you stop it or if you want to run an older/newer version
Code:
docker system prune -a
Once it has been pruned, you can use the same code above to run the container again and it will still have the same name "CodeProject.AI-Server", otherwise it will have an autogenerated container ID that you will need to get by issuing the "docker container ls" command so you can stop it.
 
Last edited:

kwil2001

n3wb
Joined
Jan 3, 2021
Messages
3
Reaction score
0
Hi. I've justs installed CP.AI when I go into the AI part on BI can click on "open ai dashboard" I get an error that says

This site cant be reached

127.0.0.1 refused to connect

If I go to the start menu in windows and click on CodeProject.Ai dashboard, it opens the dashboard and says its online.



If I go into BI and click on "Start Now" or "Stop Now" I can see the other dashboard changes to on or
off-line.

If I go to command prompt I can see that 127.0.01:32168 is.listed as established



Why can't I connect to the dashboard through BI

Thanks
 

nhs128

Young grasshopper
Joined
Jul 8, 2017
Messages
91
Reaction score
21
I just updated BI and installed the latest CP version. When I try to configure everything in BI, the installed models popup is blank and says to restart AI to refresh the list. I've done that both inside of BI, I've restarted the process manually, and rebooted the PC. I've also ran a repair on CPAI. Any thoughts?
 

truglo

Pulling my weight
Joined
Jun 28, 2017
Messages
275
Reaction score
103
Your scenario sounds a bit different than what I dealt with... in my case the dashboard worked fine, but BI just wouldn't communicate with cpai. To fix I 1) disabled AI in BI settings, 2) stopped BI service and shutdown BI, 3) uninstalled cpai through windows, 4) deleted the cpai folder under Program Files, 5) reboot windows, 6) install cpai 2.0.7, 7) verify the cpai dashboard works, 8) open BI and enable cpai in AI settings (start with BI checked), 9) reboot windows and verify AI works as expected. Note prior to all of this, I already had the cuda driver and nvidia driver versions recommended in the cpai install notes... I did not mess with drivers since the initial install a couple weeks ago.

So maybe stopping BI and the BI service, and doing a full uninstall of cpai (including deleting the cpai folders after uninstalling) will help?
 
Joined
Oct 16, 2018
Messages
1,676
Reaction score
5,523
Location
Florida, USA
Last edited:

nhs128

Young grasshopper
Joined
Jul 8, 2017
Messages
91
Reaction score
21
Your scenario sounds a bit different than what I dealt with... in my case the dashboard worked fine, but BI just wouldn't communicate with cpai. To fix I 1) disabled AI in BI settings, 2) stopped BI service and shutdown BI, 3) uninstalled cpai through windows, 4) deleted the cpai folder under Program Files, 5) reboot windows, 6) install cpai 2.0.7, 7) verify the cpai dashboard works, 8) open BI and enable cpai in AI settings (start with BI checked), 9) reboot windows and verify AI works as expected. Note prior to all of this, I already had the cuda driver and nvidia driver versions recommended in the cpai install notes... I did not mess with drivers since the initial install a couple weeks ago.

So maybe stopping BI and the BI service, and doing a full uninstall of cpai (including deleting the cpai folders after uninstalling) will help?
No luck on that. I was able to choose the custom models folder before upgrading blue iris but cannot do so now.
 

Crest6010

Young grasshopper
Joined
Nov 20, 2019
Messages
38
Reaction score
5
Location
Maryland
Hey Everybody, what type of detection times are you all getting with your GPUs? I have a Quadro K220, 4GB RAM and I'm seeing some really long processing times now.
 
Top