- 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.
- Introduced parallel processing using `ThreadPoolExecutor` to enhance the performance of the `calculate_affinity_matrix` function, allowing simultaneous processing of multiple cameras.
- Added a new helper function `_single_camera_job` to encapsulate the logic for processing individual camera detections, improving code organization and readability.
- Updated the function signature to include an optional `max_workers` parameter for controlling the number of threads used in parallel execution.
- Enhanced documentation to clarify the purpose and parameters of the new parallel processing implementation.
- 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.
- Replaced direct access to tracking and detection timestamps with a more efficient use of `itertools.chain` to gather timestamps, enhancing readability and performance in `calculate_camera_affinity_matrix_jax`.
- Maintained precision in timestamp calculations to ensure accurate results in affinity computations.
Epoch timestamps are ~1.7 × 10⁹; storing them in float32 wipes out
sub‑second detail (resolution ≈ 200 ms). Keep them in float64 until
after subtraction so we preserve Δt‑on‑the‑order‑of‑milliseconds.
- Introduced a `_DEBUG_CURRENT_TRACKING` variable to track the current indices of tracking and detection during calculations.
- Added a `_global_current_tracking_str` function to format the current tracking state for debugging purposes.
- Enhanced `calculate_distance_2d` and `calculate_tracking_detection_affinity` functions with debug print statements to log intermediate values, improving traceability of calculations.
- Updated `perpendicular_distance_camera_2d_points_to_tracking_raycasting` to accept `delta_t` from the caller while ensuring it adheres to a minimum threshold.
- Refactored timestamp handling in `calculate_camera_affinity_matrix_jax` to maintain precision during calculations.
- 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.
- 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.
- Added a new `AffinityResult` class to encapsulate the results of affinity computations, including the affinity matrix, trackings, and their respective indices.
- Introduced a vectorized implementation of `calculate_camera_affinity_matrix_jax` to enhance performance by leveraging JAX's capabilities, replacing the previous double-for-loop approach.
- Updated tests in `test_affinity.py` to include parameterized benchmarks for comparing the performance of the new vectorized method against the naive implementation, ensuring accuracy and efficiency.
- Added property-based tests for camera affinity calculations using Hypothesis, enhancing test coverage and reliability.
- Updated `.gitignore` to include `.hypothesis` directory.
- Added `hypothesis` and `pytest` as dependencies in `pyproject.toml` and `uv.lock` for improved testing capabilities.
- Refactored imports in `playground.py` to include `Sequence` and `Mapping` from `beartype.typing`.
- Introduced a new test file `tests/test_affinity.py` for structured testing of affinity calculations.
- Introduced `calculate_camera_affinity_matrix` to compute affinity between trackings and detections for individual cameras, enhancing modularity.
- Added `process_detections_iteratively` to handle detections camera by camera, improving efficiency and scalability.
- Enhanced type hints and documentation for new functions, clarifying parameters and return values.
- Refactored existing affinity calculation logic to integrate new functionalities, ensuring better organization and readability.
- Updated the return type of `perpendicular_distance_point_to_line_two_points` to `Float[Array, ""]` for improved type clarity.
- Added detailed docstrings to `perpendicular_distance_point_to_line_two_points`, specifying arguments and return values for better understanding.
- Streamlined the distance calculation in `perpendicular_distance_camera_2d_points_to_tracking_raycasting` by removing unnecessary type casting, enhancing code readability.
- Changed the return type of `perpendicular_distance_point_to_line_two_points` to `jnp.floating[Any]` for improved type accuracy.
- Refactored the `perpendicular_distance_camera_2d_points_to_tracking_raycasting` function to store distances in a typed variable, enhancing clarity and type safety.
- Improved the overall readability of the distance calculation logic by returning the computed distances directly.
- Introduced a new function `calculate_affinity_matrix` to compute the affinity matrix between trackings and detections, enhancing modularity and clarity.
- Updated the existing affinity calculation logic to utilize the new function, improving code organization and readability.
- Adjusted the image size parameter in the distance calculation to ensure proper type handling.
- Enhanced documentation for the new function, detailing its parameters, return values, and matrix layout for better understanding.
- 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.
- Modified the distance calculation function to accept an image size parameter, enhancing accuracy in 2D distance computations.
- Improved the integration of camera parameters into the tracking logic for better performance and reliability.
- 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.
- Introduced new functions for calculating 2D distances and affinities between detections, improving tracking capabilities.
- Added a `Tracking` dataclass with detailed docstrings for better clarity on its attributes.
- Refactored code to utilize `shallow_copy` for handling detections and improved organization of imports.
- Enhanced the cross-view association logic to accommodate the new functionalities, ensuring better integration with existing tracking systems.
- Removed the `play.ipynb` notebook and created a new `playground.py` script to enhance code organization and maintainability.
- Updated `pyproject.toml` to include `jupytext` for Jupyter notebook conversion support.
- Added instructions in `README.md` for converting notebooks using Jupytext.
- Enhanced the `uv.lock` file to reflect the new dependency on Jupytext.