Fix/tensorflow face detection null error#123
Open
Ruthwik000 wants to merge 2 commits intoruxailab:mainfrom
Open
Fix/tensorflow face detection null error#123Ruthwik000 wants to merge 2 commits intoruxailab:mainfrom
Ruthwik000 wants to merge 2 commits intoruxailab:mainfrom
Conversation
- Adjusted help-text margin from -8px to 12px to prevent overlap with input box border - Improves visual clarity and readability in General Configuration section
- Added TensorFlow.js and face-landmarks-detection imports - Implemented model loading in created() lifecycle hook - Added retry logic with maximum retry count in detectFace() - Added proper error handling for model loading failures - Ensured model is loaded before attempting face detection Fixes: Cannot read properties of null (reading 'estimateFaces')
Author
|
@marcgc21 @KarinePistili @jvJUCA kindly review the pr ,let me know if any suggestions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR fixes a critical bug where the calibration page crashes due to a null reference error when attempting to perform face detection. The issue occurred when users navigated directly to the calibration page without going through the camera configuration flow.
Problem Statement
The
DoubleCalibrationRecord.vuecomponent was missing TensorFlow.js model initialization logic, causing it to fail when the model wasn't pre-loaded by theCameraConfiguration.vuecomponent. This blocked the entire calibration workflow, especially for RuxaiLab integration users.Error:
Solution
Changes Made
1. Added TensorFlow.js Imports
2. Implemented Model Loading in
created()Lifecycle3. Enhanced
detectFace()Method with Retry Logic4. Added Vue Reactivity Fix
$nextTick()to ensure Vue updates computed properties before proceedingFiles Changed
src/views/DoubleCalibrationRecord.vue(+50 lines, -5 lines)created()lifecycle with model loadingdetectFace()method with retry logicRelated Issues
Fixes #122 - TensorFlow.js Face Detection Null Reference Error
Screenshots
Before Fix
After Fix
Type: Bug Fix
Priority: High
Component: Frontend - Calibration
Estimated Review Time: 15-20 minutes