Feat/Backend: Add Depth Estimation for Object Proximity Warnings-147#239
Open
tamannaa-rath wants to merge 2 commits into
Open
Feat/Backend: Add Depth Estimation for Object Proximity Warnings-147#239tamannaa-rath wants to merge 2 commits into
tamannaa-rath wants to merge 2 commits into
Conversation
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.
🔗 Related Issue
Closes #147
📝 Summary of Changes
This PR adds a new
DepthEstimatormodule to handle smart distance checking for industrial hazards.MiDaS_small), and calculates the average relative distance of that specific object.🔍 Type of Change
🧪 How Was This Tested?
I ran the automated unit testing suite locally to check the initialization logic, min-max image math normalization, matrix array slicing coordinates, and the proximity alert limits.
Test environment:
✅ Pre-Submission Checklist
upstream/mainpython -m pytest tests/).envfiles, secrets, or model weights💬 Additional Notes for Reviewer
Hardware-Adaptive Logic: The code automatically detects the user's computer specs. It safely falls back to CPU processing if an NVIDIA GPU isn't available, meaning it can be run locally without system crashes.
No-Download Testing: The test suite uses unittest.mock to completely bypass downloading the heavy 300MB model files from the internet during test execution.