1
0
forked from HQU-gxy/CVTH3PE
Commit Graph

24 Commits

Author SHA1 Message Date
c78850855c feat: Introduce LastDifferenceVelocityFilter for improved tracking velocity estimation
- Added a new `LastDifferenceVelocityFilter` class to estimate tracking velocities based on the last observed keypoints, enhancing the tracking capabilities.
- Updated the `Tracking` class to utilize the new velocity filter, allowing for more accurate predictions of keypoints over time.
- Refactored the `predict` method to support various input types (float, timedelta, datetime) for better flexibility in time handling.
- Improved timestamp handling in the `perpendicular_distance_camera_2d_points_to_tracking_raycasting` function to ensure adherence to minimum delta time constraints.
- Cleaned up imports and type hints for better organization and clarity across the codebase.
2025-05-02 11:11:32 +08:00
072bf1c46f feat: Integrate pyrsistent for enhanced tracking state management
- Added `pyrsistent` as a dependency to manage historical detections in the `Tracking` class, improving data integrity and immutability.
- Updated the `GlobalTrackingState` to include historical detections using `PVector`, facilitating better tracking of past detections.
- Introduced a new `update_tracking` function to handle timestamp updates for tracking objects, enhancing the tracking logic.
- Refactored imports and type hints for improved organization and clarity across the codebase.
2025-04-30 10:04:39 +08:00
29ca66ad47 refactor: Update affinity matrix calculation and dependencies
- Replaced the `linear_sum_assignment` import from `scipy.optimize` with `hungarian_algorithm` from `optax` to enhance performance in affinity matrix calculations.
- Introduced a new `AffinityResult` class to encapsulate results of affinity computations, including trackings and detections, improving the structure of the affinity calculation process.
- Removed deprecated functions and debug print statements to streamline the codebase.
- Updated `pyproject.toml` and `uv.lock` to include `optax` as a dependency, ensuring compatibility with the new implementation.
- Refactored imports and type hints for better organization and consistency across the codebase.
2025-04-29 15:45:24 +08:00
65cc646927 feat: Introduce Tracking class and refactor pose prediction
- Added a new `Tracking` class to encapsulate tracking data, including keypoints and velocity, with a method for predicting 3D poses based on velocity.
- Refactored the pose prediction logic in `calculate_camera_affinity_matrix_jax` to utilize the new `predict` method from the `Tracking` class, enhancing clarity and modularity.
- Introduced an `AffinityResult` class to manage results of affinity computations, including trackings and detections, improving the structure of the affinity calculation process.
- Updated imports and type hints for better organization and consistency across the codebase.
2025-04-29 12:14:08 +08:00
86fcc5f283 feat: Enhance 3D pose prediction and camera affinity calculations
- Introduced a JAX-friendly implementation of `predict_pose_3d` to predict 3D poses based on tracking velocities, improving performance by avoiding Python control flow.
- Updated `calculate_camera_affinity_matrix_jax` to streamline the affinity matrix calculation, incorporating velocity handling for trackings and enhancing clarity in the distance computation.
- Added properties for normalized keypoints in the `Detection` class, allowing for lazy evaluation and improved usability.
- Enhanced documentation throughout to clarify function purposes and parameters.
2025-04-29 12:06:07 +08:00
b3ed20296a revert 2025-04-28 18:01:24 +08:00
41e0141bde refactor: Update type hints and enhance affinity calculations in playground.py
- Changed function signatures to use `Sequence` instead of `list` for better type flexibility.
- Introduced a new function `calculate_tracking_detection_affinity` to streamline the calculation of affinities between tracking and detection objects.
- Refactored existing affinity calculation logic to improve clarity and performance, leveraging the new affinity function.
- Removed commented-out code to clean up the implementation and enhance readability.
2025-04-27 17:45:31 +08:00
a4cc34f599 feat: Enhance playground.py with new 3D tracking and affinity calculations
- Added functions for calculating perpendicular distances between predicted 3D tracking points and camera rays, improving 3D tracking accuracy.
- Introduced a new function for calculating 3D affinity scores based on distances and time differences, enhancing the integration of 3D tracking with existing systems.
- Updated existing functions to support new data types and improved documentation for clarity on parameters and return values.
- Refactored affinity calculation logic to utilize JAX for performance optimization in distance computations.
2025-04-27 16:56:49 +08:00
95873a3e4e feat: Improve documentation for unprojection functions in camera module
- Enhanced docstrings for `unproject_points_to_z_plane` and the corresponding method in the `Camera` class to provide detailed descriptions of arguments and return values.
- Clarified the purpose and usage of the unprojection functionalities, improving overall code readability and usability.
2025-04-24 19:00:05 +08:00
c3c93f6ca6 feat: Enhance play notebook and camera module with new unprojection functionalities
- Updated the play notebook to include new methods for unprojecting 2D points onto a 3D plane.
- Introduced `unproject_points_onto_plane` and `unproject_points_to_z_plane` functions in the camera module for improved point handling.
- Enhanced the `Camera` class with a method for unprojecting points to a specified z-plane.
- Cleaned up execution counts in the notebook for better organization and clarity.
2025-04-24 18:55:24 +08:00
ba551d2f5d refactor: Enhance play notebook and camera module with undistortion functionality
- Updated the play notebook to reset execution counts and remove unnecessary output displays for clarity.
- Introduced a new `undistort_points` function in the camera module to handle point undistortion using OpenCV.
- Added a `keypoints_undistorted` property to the `Detection` class for lazy evaluation of undistorted keypoints.
- Improved documentation to clarify the usage of keypoints and their undistorted counterparts.
2025-04-22 11:58:06 +08:00
3ccf790bac refactor: Optimize distortion function for clarity and performance
- Added JAX Just-In-Time (JIT) compilation to the `distortion` function for improved performance.
- Reorganized variable unpacking and calculations for better readability and efficiency.
- Enhanced comments to clarify the steps involved in the distortion process, including normalization and radial/tangential distortion calculations.
- Updated the return values to directly reflect pixel coordinates after distortion.
2025-04-22 11:43:55 +08:00
cb369b35da refactor: Update distortion and projection functions for clarity and usability
- Enhanced docstrings for `distortion` and `project` functions to clarify input expectations and output formats, emphasizing pixel coordinates.
- Improved variable naming for distortion calculations to enhance readability.
- Added checks for valid points in the `project` function, ensuring proper handling of distortion parameters.
- Introduced a new method `project_ideal` in the `Camera` class for projecting 3D points without distortion, improving usability.
2025-04-22 11:41:54 +08:00
032eb684ec feat: Enhance play notebook and camera module with new projection and distortion functionalities
- Updated play notebook to include new tracking and clustering functionalities.
- Introduced `distortion` and `project` functions for applying distortion to 2D points and projecting 3D points to 2D, respectively.
- Enhanced `CameraParams` and `Camera` classes with methods for distortion and projection, improving usability.
- Cleaned up execution counts in the notebook for better organization.
2025-04-21 18:38:08 +08:00
40f3150417 feat: Enhance play notebook and camera module with new functionalities
- Updated play notebook with additional imports and new functions for point triangulation and undistortion.
- Introduced `triangulate_one_point_from_multiple_views_linear` and `triangulate_points_from_multiple_views_linear` for batch triangulation of points.
- Added `triangle_from_cluster` function to facilitate triangulation from detection clusters.
- Enhanced `CameraParams` and `Detection` dataclasses with a projection matrix property for improved usability.
- Cleaned up imports and execution counts in the notebook for better organization.
2025-04-17 11:48:53 +08:00
3cc93e5eae feat: Enhance play notebook with new data structures and visualization utilities
- Added new TypedDict classes for camera parameters, including Resolution, Intrinsic, and Extrinsic.
- Updated dataset reading logic to accommodate new camera parameters structure.
- Introduced functions for reading datasets by port and visualizing whole body keypoints.
- Improved the affinity matrix calculation logic in the camera module.
- Updated dependencies in pyproject.toml to include Plotly and SciPy for enhanced functionality.
2025-04-16 18:53:05 +08:00
3f32333de4 refactor: Update camera module for improved type handling and utility functions
- Reorganized imports for better clarity and consistency.
- Renamed variables in distance calculation functions for improved readability.
- Enhanced `compute_affinity_epipolar_constraint_with_pairs` function with detailed docstring explaining its purpose and parameters.
- Updated function signature to accept both list and dictionary formats for detections, improving flexibility.
- Adjusted affinity calculation logic to ensure consistent naming conventions for parameters.
2025-04-15 11:06:34 +08:00
92477b18d2 feat: Enhance camera module with new data structures and utility functions
- Introduced dataclass structures for CameraParams and Camera to improve type safety and clarity.
- Added Detection dataclass to encapsulate detection data, including keypoints and timestamps.
- Implemented classify_by_camera function to organize detections by camera.
- Added utility functions for converting points to homogeneous coordinates and calculating distances to lines.
- Updated dependencies in pyproject.toml to include new libraries for enhanced functionality.
2025-04-15 10:20:49 +08:00
3ce5b564bf feat: Add beartype for runtime type checking and update dependencies
- Add beartype dependency to pyproject.toml and uv.lock
- Replace typeguard with beartype in type checking
- Create camera module with type-safe camera parameter definitions
- Migrate utility function to use beartype and JAX numpy
2025-03-06 18:35:43 +08:00
a06b3e8399 feat: Add perpendicular distance calculation utility function
Implemented a utility function `calculate_perpendicular_distance` in the `app/utils/__init__.py` module. The function calculates the perpendicular distance between a point and a line using NumPy, with type hints and runtime type checking using jaxtyping and typeguard.
2025-03-04 17:34:27 +08:00
6034175a10 refactor: Migrate solver module to use CVXOPT wrapper
- Rename `_wrap` to `_cvx_opt_wrap` for consistency
- Update import paths in solver module
- Add type hints to `solution_mat_clusters` method
- Improve type annotations in `solve` method
2025-03-03 17:40:05 +08:00
39da7992d4 feat: Add CVXOPT solver infrastructure and VSCode settings
- Add CVXOPT dependency to pyproject.toml and uv.lock
- Create solver module with GLPK-based integer linear programming solver
- Add VSCode Python analysis settings
- Implement matrix and sparse matrix wrappers for CVXOPT
- Add GLPK solver wrapper with type-safe interfaces
2025-03-03 17:27:42 +08:00
f0f71f7f81 x 2025-03-03 12:03:37 +08:00
25a66cd95c x 2025-03-03 11:37:05 +08:00