Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't handle multiple plate detections per vehicle #2

Open
chrismuntean opened this issue May 2, 2024 · 0 comments
Open

Can't handle multiple plate detections per vehicle #2

chrismuntean opened this issue May 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@chrismuntean
Copy link
Owner

chrismuntean commented May 2, 2024

Issue explanation

image
When testing the code file on other videos yesterday (January 18th, 2024) I realized I wrote the temporal redundancy algorithm to handle only one plate area detection (per car) and only one string detection per plate area.

  • This causes problems because the same voted plate will display on all plate area detections, and the temporal redundancy algorithm will combine all of the different plate detections no matter what region they come from and create a completely wrong plate based on two different data points that it views as one.

Possible fix

This could be fixed by using similar code to what I have written for logging the plates for specific vehicles by using the "track" function from Ultralytics and using their ID number to differentiate detections. I would also split the detections under each vehicle into multiple tracking IDs, and log them separately under each vehicle.

The logs would look something like this:

/logs/tmp
	|-- /Vehicle_1
	|	|-- /Plate_area_1
	|	|	|-- tracking.json
	|	|	|-- detections.json
	|	|-- /Plate_area_2
	|		|-- tracking.json
	|		|-- detections.json
	|-- /Vehicle_2
		|-- /Plate_area_1
			|-- tracking.json
			|-- detections.json

Roadblocks

After thinking over the amount of complicated work I’d have to go through to allow for all of this data, and writing complicated code to allow for tracking multiple detections I decided not to do this.

For now unless there are many times where I have multiple unsuccessful detections in videos, then I will just be using my current temporal redundancy algorithm that takes all string detections from all plate area detections and displaying that as the voted plate for each vehicle.

However, I won’t make changes to the code displaying the detection information in case errors come up later down the road, it will be easier for me to identify and fix.

@chrismuntean chrismuntean added the bug Something isn't working label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant