How coccoexe/food-recognition-and-leftover-estimation works
Main Components
• Data Source:
• Core Image Processing Modules:
• Segmentation Component: Implemented mainly in src/Segmentation.cpp and src/Segmentation.hpp, where the segmentation algorithm processes top-view images.
• Metrics Calculation: In src/Metrics.cpp and src/Metrics.hpp, the consumption rate computations and comparisons between before/after images are performed.
• Main Application:
• Optional Interfaces/Extensions:
• Python Interface: Located in src/Python/CLIP_interface.py, potentially used for interfacing with other tools or providing a lightweight scripting interface.
• Legacy/Old Code: The old code directory shows previous experimental implementations (such as CLIP and image masking in C++ and Python). Although not the main execution path now, they might be mentioned for historical context or future reference.
• Documentation/Assignment Material:
• The assignment (in the assignment folder) and matching directories (likely experimental results) form a peripheral but essential documentation layer.
Relationships and Interactions
• Data Flow:
• The Segmentation Module outputs segmented regions (food parts, leftovers).
• The resulting data flows into the Metrics Module where the rate of food consumption is computed.
• The main application coordinates these operations.
• Interfaces:
• Dependencies:
Architectural Patterns and Design Principles
• Separation of Interface and Implementation: With the presence of both C++ and Python interfaces, the design separates low-level computation from higher-level interfacing.
Relevant Technologies
• C++: Core computation, segmentation, and metrics.
• Python: A scripting/bridging interface.
• Build/Configuration: CMake (CMakeLists.txt and CMakePresets.json) for project management.
• Adding configuration/build (CMake) as a supporting component that ties into the compilation and orchestration of the modules.