O TrafficJamanalyzer é uma ferramenta avançada projetada para ajudar a monitorar e analisar as condições de tráfego, processando imagens de câmeras de CCTV ao redor das estradas de Tenerife. Ao utilizar a inteligência artificial (AI) com kernel semântico e o Openai, o aplicativo avalia com precisão a densidade de tráfego e identifica locais com possíveis engarrafamentos.
Antes de instalar o TrafficJamanalyzer, verifique se o seu sistema atende aos seguintes requisitos:
Siga estas etapas para instalar o TrafficJamanalyzer:
Clone o repositório :
git clone https://github.com/emimontesdeoca/TrafficJamAnalyzer.git
cd TrafficJamAnalyzerConfigure o ambiente : verifique se o .NET 8 SDK está instalado em sua máquina. Baixe aqui.
Instale dependências : instale os pacotes necessários usando o Nuget Package Manager:
dotnet restoreConfigure a integração da IA :
AiApiService .Construa o aplicativo :
dotnet buildExecute o aplicativo :
dotnet runO projeto está estruturado da seguinte maneira:
C:DEVELOPMENTSPEAKSAITRAFFICJAMANALYZER
├───TrafficJamAnalyzer.ApiService
├───TrafficJamAnalyzer.AppHost
├───TrafficJamAnalyzer.ServiceDefaults
├───TrafficJamAnalyzer.Services.AiApiService
├───TrafficJamAnalyzer.Services.ScraperApiService
├───TrafficJamAnalyzer.Services.TrafficService
├───TrafficJamAnalyzer.Shared.Clients
├───TrafficJamAnalyzer.Shared.Models
├───TrafficJamAnalyzer.Web
└───TrafficJamAnalyzer.Workers.Analyzer
Edite o arquivo appsettings.json no projeto de TrafficJamAnalyzer.Services.AiApiService para incluir suas configurações de integração da API do OpenAI:
{
"Logging" : {
"LogLevel" : {
"Default" : " Information " ,
"Microsoft.AspNetCore" : " Warning "
}
},
"AllowedHosts" : " * " ,
"OpenAI" : {
"Endpoint" : " " ,
"DeploymentName" : " " ,
"ApiKey" : " " ,
"Prompt" : " The image I'm going to provide you is an image from a CCTV that shows a road, I need you to give me a JSON object with 'Title'' which is title in the top left and 'Traffic' which is an integer from 0 to 100 which shows the amount of traffic jam and the 'Date' that is on the bottom right, please only provide the JSON result and nothing else. Return only the json object without any markdown. If you a lot of lanes, please focus on the one that is busy when checking for the traffic, so, if you see 4 lanes and only 2 are full, it means that the traffic is jammed. "
}
}Inicie o aplicativo : Inicie o aplicativo através da linha de comando ou do IDE escolhido.
Definir configurações :
appsettings.json .Iniciar Análise : Inicie a análise de tráfego em tempo real para monitorar e avaliar as condições de tráfego.
Resultados da revisão : As condições de tráfego serão exibidas no painel, destacando áreas com possíveis engarrafamentos.
Congratulamo -nos com contribuições para o TrafficJamanalyzer!
git checkout -b feature/your-feature-namegit commit -m ' Add some feature 'git push origin feature/your-feature-name Distribuído sob a licença do MIT. Consulte LICENSE para obter mais informações.
Obrigado por usar o TrafficJamanalyzer! Esperamos que isso ajude você a manter as estradas do Tenerife livre de tráfego.