From 712a87b696f6c2246cf1ed0b86e15351e291f3fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tha=C3=ADs=20Ferreira?= Date: Fri, 31 Jan 2025 20:08:03 -0300 Subject: [PATCH] =?UTF-8?q?vers=C3=A3o=2020h07?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 106 +------- src/views/TrainingView.vue | 538 +++++++++++++++++-------------------- src/views/UsersView.vue | 2 +- 3 files changed, 257 insertions(+), 389 deletions(-) diff --git a/README.md b/README.md index 04a1db6..0db9c12 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ Pré-requisitos **JSON Server para a API mockada.** ## Clone o repositório: -- git clone https://github.com/seu-usuario/TARS-LAB.git -- cd olhe-ai +- git clone https://gitlab.com/tars-labs/front-face-recognition.git +- cd front-face-recognition ## Instale as dependências: Certifique-se de ter o **Node.js** e o **npm** instalados. Em seguida, instale as dependências do projeto. @@ -27,9 +27,6 @@ Certifique-se de ter o **Node.js** e o **npm** instalados. Em seguida, instale a ## Inicie o servidor de desenvolvimento: - npm run dev -## Inicie o servidor de produção: -- npx run mock - ## Acesse a aplicação no navegador: http://localhost:5173/ @@ -46,101 +43,4 @@ Os testes de integração estão localizados na pasta tests/integration. Execute ---- ## Estrutura -├── public -│ ├── favicon.ico -│ └── index.html -├── src -│ ├── assets -│ │ ├── styles -│ │ │ ├── base.css -│ │ │ └── main.css -│ │ └── logo.svg -│ ├── components -│ │ ├── common -│ │ │ ├── BaseButton.vue -│ │ │ ├── BaseInput.vue -│ │ │ ├── BaseSelect.vue -│ │ │ ├── BaseTable.vue -│ │ │ └── LoadingSpinner.vue -│ │ ├── dashboard -│ │ │ ├── DashboardModelList.vue -│ │ │ └── ModelCard.vue -│ │ ├── icons -│ │ │ ├── IconCommunity.vue -│ │ │ ├── IconDocumentation.vue -│ │ │ ├── IconEcosystem.vue -│ │ │ ├── IconSupport.vue -│ │ │ └── IconTooling.vue -│ │ ├── reports -│ │ │ ├── DateFilter.vue -│ │ │ └── ReportTable.vue -│ │ ├── testing -│ │ │ ├── ApiTester.vue -│ │ │ └── TestingList.vue -│ │ ├── __tests__ -│ │ │ └── HelloWorld.spec.js -│ │ ├── training -│ │ │ ├── CameraSelector.vue -│ │ │ └── TrainingModelList.vue -│ │ ├── users -│ │ │ ├── UserForm.vue -│ │ │ └── UserTable.vue -│ │ ├── AppLayout.vue -│ │ ├── HelloWorld.vue -│ │ └── TheWelcome.vue -│ ├── mock -│ │ ├── data.js -│ │ ├── db.json -│ │ ├── handlers.js -│ │ └── server.js -│ ├── plugins -│ │ └── vuetify.js -│ ├── router -│ │ └── index.js -│ ├── services -│ │ ├── api.js -│ │ ├── authservice.js -│ │ ├── modelservice.js -│ │ ├── reportservice.js -│ │ └── userservice.js -│ ├── store -│ │ ├── modules -│ │ │ ├── auth.js -│ │ │ ├── models.js -│ │ │ ├── reports.js -│ │ │ └── users.js -│ │ └── index.js -│ ├── utils -│ │ ├── constants.js -│ │ ├── helpers.js -│ │ └── validators.js -│ ├── views -│ │ ├── AboutView.vue -│ │ ├── DashboardView.vue -│ │ ├── HomeView.vue -│ │ ├── LoginView.vue -│ │ ├── ReportsView.vue -│ │ ├── TestingView.vue -│ │ ├── TrainingView.vue -│ │ └── UsersView.vue -│ ├── App.vue -│ └── main.js -├── store -│ └── index.js -├── tests -│ └── unit -│ ├── integration -│ │ ├── login.spec.js -│ │ └── users.spec.js -│ ├── auth.spec.js -│ ├── models.spec.js -│ └── users.spec.js -├── db.json -├── index.html -├── jsconfig.json -├── package.json -├── package-lock.json -├── README.md -├── vite.config.js -├── vitest.config.js -└── vue.config.js \ No newline at end of file +... \ No newline at end of file diff --git a/src/views/TrainingView.vue b/src/views/TrainingView.vue index 54a84e8..82a0d86 100644 --- a/src/views/TrainingView.vue +++ b/src/views/TrainingView.vue @@ -3,246 +3,193 @@ - Data/Hora - Câmera_id + Cadastro + Câmera ID Pesquisar Treino Lista de Nomes - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + Cadastrar Modelo + + + - - - - + + + + + + + + + + + Pesquisar + + + - - - - - - - - - - - -
- mdi-cloud-upload -
- Arraste as imagens aqui ou - - clique para selecionar - -
-
- Suporta múltiplas imagens -
-
-
-
- - - - Imagens Selecionadas - - - - - - - - - mdi-delete - - - - - - - - - - - - -
Treinando Modelo
- + + + + Treinamento de Modelo de Câmera + + + + + + + - - -
{{ trainingStatus }}
+ Iniciar Treinamento + + + Integrar + +
+
+ + + Detalhes do Treinamento + +

Câmera: {{ selectedCameraForTraining.name }}

+

ID: {{ selectedCameraForTraining.id }}

+ +
+ {{ trainingMessage }} +
- - -
+
+
+ + - - - - - - - - - + + + + + Rostos Identificados + + + + - {{ name }} - - - - - - + + mdi-account-circle + + + ID: {{ face.id }} - {{ face.name }} + + {{ face.isActive ? 'Ativo' : 'Inativo' }} + + + + + + + + + + + + Rostos Não Identificados + + + + + + mdi-account-circle + + + + + + + + Confirmar Atribuições + + + + + - - - - - - - Iniciar Treinamento - - - Integrar - - - - - - {{ snackbar.text }} - -
@@ -251,75 +198,96 @@ export default { data() { return { - activeTab: null, - dateMenu: false, - timeMenu: false, - selectedDate: '', - selectedTime: '', - selectedCamera: null, - cameras: [], // A lista de câmeras - searchQuery: '', - uploadedFiles: [], - isDragging: false, - isTraining: false, - trainingProgress: 0, - trainingStatus: '', - namesList: [], - newName: '', - snackbar: { - show: false, - color: 'success', - text: '', + activeTab: 0, + cameraModel: { + name: '', + id: '', + description: '', + registrationDate: null }, - canStartTraining: false, - trainedModel: null, + searchCriteria: { + id: '', + name: '' + }, + selectedCameraForTraining: null, + isTraining: false, + trainingComplete: false, + trainingProgress: 0, + trainingMessage: '', + untrainedCameras: [ + { id: 'CAM003', name: 'Câmera Estacionamento', brand: 'Dahua' } + ], + identifiedFaces: [ + { + id: 'USER001', + name: 'João Silva', + isActive: true + }, + { + id: 'USER002', + name: 'Maria Souza', + isActive: true + } + ], + unidentifiedFaces: [ + { selectedUser: null }, + { selectedUser: null } + ], + registeredUsers: ['João Silva', 'Maria Souza', 'Pedro Santos', 'Ana Oliveira'] }; }, methods: { - handleDrop() { - this.isDragging = false; + registerCameraModel() { + console.log('Registrando modelo de câmera:', this.cameraModel); + this.cameraModel = { + name: '', + id: '', + description: '', + registrationDate: null + }; }, - handleFileInput(event) { - const files = event.target.files; - for (let i = 0; i < files.length; i++) { - this.uploadedFiles.push(files[i]); - } - }, - getFilePreview(file) { - return URL.createObjectURL(file); // Retorna o preview da imagem - }, - removeFile(index) { - this.uploadedFiles.splice(index, 1); + searchCameraModels() { + console.log('Critérios de pesquisa:', this.searchCriteria); }, startTraining() { - this.isTraining = true; - // Lógica para iniciar treinamento - }, - integrateModel() { - // Lógica para integrar o modelo - }, - addName() { - if (this.newName && !this.namesList.includes(this.newName)) { - this.namesList.push(this.newName); - this.newName = ''; + if (this.selectedCameraForTraining) { + this.isTraining = true; + this.trainingProgress = 0; + this.trainingMessage = 'Iniciando treinamento...'; + + const simulateTraining = setInterval(() => { + this.trainingProgress += 20; + + switch(this.trainingProgress) { + case 20: + this.trainingMessage = 'Carregando modelos de reconhecimento...'; + break; + case 40: + this.trainingMessage = 'Processando imagens de treinamento...'; + break; + case 60: + this.trainingMessage = 'Ajustando parâmetros do modelo...'; + break; + case 80: + this.trainingMessage = 'Finalizando treinamento...'; + break; + case 100: + this.trainingMessage = 'Treinamento concluído!'; + this.trainingComplete = true; + clearInterval(simulateTraining); + break; + } + }, 1000); } }, - removeName(index) { - this.namesList.splice(index, 1); + integrateModel() { + console.log('Integrando modelo:', this.selectedCameraForTraining); + this.trainingComplete = false; + this.isTraining = false; }, - }, -}; - - - + \ No newline at end of file diff --git a/src/views/UsersView.vue b/src/views/UsersView.vue index 8531924..3b3b0c5 100644 --- a/src/views/UsersView.vue +++ b/src/views/UsersView.vue @@ -3,7 +3,7 @@ - USUÁRIOS + Usuários