How gadu05/projeto-reconhecimento-facial-ifciencia works
Project Type and Purpose
• This is a standalone machine‐learning‐powered desktop application (implemented as a Jupyter notebook) that uses a computer’s webcam to capture facial images and run inference on a pre‐trained TensorFlow model to detect signs of monkeypox. It is not a web or mobile app, nor a client‐server architecture—everything runs locally.
Main Components
a. Input Source: Computer webcam (hardware device)
b. Application Layer: Python/Jupyter Notebook code (reconhecimentoFacial.ipynb)
c. Model Loader & Inference Engine: TensorFlow runtime (loads modelo/saved_model.pb and keras_metadata.pb, or uses checkpoint files)
d. Preprocessing Module: Image acquisition and preprocessing routines (e.g., OpenCV code to capture frames, resize, normalize)
e. Postprocessing & Decision Logic: Converts raw model outputs (probabilities or logits) into user–readable predictions (e.g., “disease detected” vs. “no disease detected”)
f. Output/Display Layer: Overlays results on video feed or prints to console
g. External Storage (optional): Google Drive link for downloading model artifacts
Relationships and Data Flow
1) The webcam continuously streams raw frames into the notebook’s capture routine.
3) Preprocessed images are passed to the TensorFlow Inference Engine, which loads the model from modelo/ or checkpoint/.
4) The model outputs a prediction for each frame.
5) The postprocessing module interprets these predictions, applies thresholds or smoothing, and generates a final decision.
6) The application layer overlays the decision on the frame or logs it for the user.
Architectural Patterns and Design Principles
• Pipeline Pattern: Sequential stages (capture → preprocess → infer → postprocess → display).
• Modularity: Each stage can be separated into distinct functional blocks or micro‐modules for easier maintenance or swapping (e.g., swapping out the model or changing the preprocessing steps).
• Resource Management: The camera device and TensorFlow session should be initialized once and reused rather than reopened per frame.
Technologies, Frameworks, and Libraries
• Python 3.x
• Jupyter Notebook interface (reconhecimentoFacial.ipynb)
• OpenCV (cv2) for video capture and image preprocessing
• TensorFlow / Keras for model loading and inference
• Google Drive (external storage) for model artifact distribution