Corrected the depth map indexing by swapping x and y for proper data retrieval. Commented out visualization flag in test data and simplified printed output to focus on the retrieved depth value.
Reduced dependency versions in `requirements.txt` to minimum necessary package names for easier maintenance. Updated `test_hf.py` to disable visualization and added new parameters `x` and `y`.
Eliminated the depth map quantization, PNG encoding, and Base64 conversion. Simplifies the depth map handling to return only normalized results. Removed unused `cv2` import as it's no longer required.
Update requirements.txt with specified dependency versions
Replaced unintelligible content in requirements.txt with a comprehensive list of dependencies and their exact versions. This ensures consistency in the development environment and resolves potential issues with missing or outdated packages.
Add compression and encoding to depth map for efficiency
The depth map is now quantized to 16-bit, encoded as a PNG, and base64-encoded for efficient transmission. This change reduces data size and ensures compatibility with various clients while maintaining depth precision within a 0-10m range.
Refactor payload and headers for improved structure.
Reorganized the payload to enable visualization explicitly and adjusted headers to dynamically use the API token. These changes ensure clearer communication with the endpoint and enhance flexibility for use cases requiring visualization.
Updated the script to retrieve the API token and endpoint URL from environment variables instead of hardcoding them. This improves security and makes the script more configurable for different environments.