Ensure Haar cascade models are included in generated project zip#418
Open
Sarvesh-Mishra1981 wants to merge 2 commits intoJdeRobot:masterfrom
Open
Ensure Haar cascade models are included in generated project zip#418Sarvesh-Mishra1981 wants to merge 2 commits intoJdeRobot:masterfrom
Sarvesh-Mishra1981 wants to merge 2 commits intoJdeRobot:masterfrom
Conversation
Contributor
Author
|
@jmplaza @toshan-luktuke @BkPankaj |
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.
Hello @toshan-luktuke @BkPankaj,
Problem
When users clicked “Build and Download” for a project that used the FaceDetector block, the downloaded project did not work. The reason was simple: an important file called haarcascade_frontalface_default.xml was missing.
This file is needed by OpenCV to detect faces. Since it was not included in the downloaded zip file, the program crashed with an error when it tried to run face detection. Because of this, users had to manually find and add the file themselves, which was confusing and inconvenient.
Solution
To fix this issue, I updated the file-matching logic in backend/synthesis/synthesis.py. Earlier, the code was not correctly picking up the Haar cascade XML files because the file pattern was too limited. I changed the wildcard pattern so it searches properly inside all folders and subfolders.
Now, the required XML file is correctly detected and automatically added to the downloaded project.
Result
After this fix, when users download a FaceDetector project, the required XML file is included in the correct folder. The project runs smoothly without any errors, and face detection works immediately after download. This makes the overall experience much better and hassle-free for users.
Testing
View Testing Link