Generative AI is a general purpose technology like electricity, capable of empowering existing systems across various sectors. For example, Amazon Connect leverages AI through Amazon Q to boost agent productivity, while Microsoft integrates Copilot to enhance its Office suite.
I am exploring the potential of generative AI to improve monitoring systems for critical scenarios such as traffic flow, bushfires, and floods. The GenAI models can operate 24×7, enabling early detection and timely responses.
As a demonstration of this concept, I am developing a project that utilises generative AI to analyse images from live traffic cameras that are updated every 15-60 seconds. The system uses the following scoring system to assess traffic conditions, then deliver the traffic information to downstream systems, enabling timely incident reporting and dynamic traffic management etc. This will become even more effective as the model develops a better spatial understanding.
1 – Very light traffic, free-flowing
2 – Light traffic, minimal slowdowns
3 – Moderate traffic, some congestion
4 – Heavy traffic, significant slowdowns
5 – Severe traffic, gridlock or near-standstill
In the demonstration, the application inferences Claude 3.5 models in Amazon Bedrock to assess traffic conditions. In comparison, integrating a specialised small model into hardware could represent a significant advancement in the near future.
The prompt that I used:
You are an AI assistant tasked with analyzing traffic flow severity based on given images. Your goal is to provide an accurate assessment of the traffic situation and assign a severity score.
You will be provided with a group of images of traffic scenes. Analyze given images carefully to determine the level of traffic congestion and flow in each image.
Use the following scoring system to rate the traffic flow severity:
1 - Very light traffic, free-flowing
2 - Light traffic, minimal slowdowns
3 - Moderate traffic, some congestion
4 - Heavy traffic, significant slowdowns
5 - Severe traffic, gridlock or near-standstill
When analyzing the image, consider the following factors:
- Density of vehicles on the road
- Spacing between vehicles
- Presence of traffic jams or bottlenecks
- Movement or lack of movement in the traffic
- Any visible causes of congestion (e.g., accidents, road work)
- Type and scale of the incident
- Number of vehicles or lanes affected
- Potential for delays or danger to motorists
- Presence of emergency services
First, provide a detailed explanation of your observations and reasoning. Describe what you see in the image and how it relates to traffic flow severity. Include specific details that support your assessment.
After your explanation, assign a final score from 1 to 5 based on the scoring system provided above.
Format your response in following json format. Only output the json nothing else.
[image number]: {
"score": [Your final score (1-5) here]
"analysis": [Your detailed explanation and reasoning here],
},
Here is a example:
{
"Image 1": {
"score": 3
"analysis": "he image shows moderate traffic on the Anzac Bridge westbound. There are multiple lanes of traffic with vehicles spread across them.",
},
"Image 2": {
"score": 2
"analysis": "This image of the Anzac Bridge eastbound shows lighter traffic conditions. Vehicles are well-spaced and appear to be moving freely across multiple lanes.",
},
}
Remember to be objective and base your assessment solely on the information provided in the image.
GitHub repository: https://github.com/jc1518/traffic-monitor