Releases: DocsaidLab/Capybara
Release 0.8.2
Release Note
This release introduces multiple improvements, including enhanced ONNX metadata handling, support for dynamic axes in ONNX models, better formatting consistency, and test suite enhancements.
ONNX Metadata Improvements
- Replaced
get_onnx_metadata
withparse_metadata_from_onnx
, ensuring consistent metadata parsing. - Updated
write_metadata_into_onnx
to always serialize metadata as JSON. - Refactored metadata formatting in
ONNXEngine
andONNXEngineIOBinding
.
Support for Dynamic Axes in ONNX Models
- Introduced
make_onnx_dynamic_axes
, which enables dynamic axes in ONNX models while ensuring compatibility withonnxsim
. - Added corresponding test cases to validate the functionality.
Code Cleanup and Formatting Standardization
- Switched all string literals to double quotes for consistency.
- Removed redundant blank lines and reformatted multi-line function calls for better readability.
- Improved dictionary formatting and standardized function parameter naming conventions.
Download Function Enhancement
- Integrated
tqdm
intodownload_from_google
, providing a progress bar for file downloads.
Testing and Resource Updates
- Added new test cases for ONNX tools, including
test_make_onnx_dynamic_axes
. - Replaced the outdated
model.onnx
test model withmodel_dynamic-axes.onnx
andmodel_shape=224x224.onnx
. - Introduced
make_onnx.py
to generate ONNX models for testing, supporting both fixed and dynamic axes.
This release enhances ONNX model flexibility, improves metadata handling, and streamlines testing and formatting. If you encounter any issues or have suggestions, feel free to report them. Thanks for your support!
What's Changed
- [C] update metadata functions by @kunkunlin1221 in #23
Full Changelog: 0.8.1...0.8.2
Release 0.7.0
Release Note
1. Key Changes in Configuration Files
Pylint Configuration (.pylintrc
)
- Updated
overgeneral-exceptions
setting:- Before:
BaseException, Exception
- After:
builtins.BaseException, builtins.Exception
- Before:
GitHub Workflow (pull_request.yml
)
- Added
paths-ignore
directive to exclude specific paths and files from triggering workflow runs:- Ignored files:
**/version.h
,doc/**
,**.md
.
- Ignored files:
- Introduced environment variables:
DOCKERFILE
:docker/pr.dockerfile
- Separated workflows into multiple jobs:
- Get Runner and UID: Fetches the runner and user/group IDs.
- Build Docker Image: Builds and pushes the Docker image for CI.
- CI Job: Executes tests using the newly built Docker image.
- Updated testing steps:
- Reorganized installation commands for Python dependencies.
- Enhanced error handling during wheel package installation.
- Added GPU options for container execution.
- Improved test coverage reporting using
pytest-cov
.
2. Dockerfile Additions
docker/pr.dockerfile
- New Dockerfile for building CI environments.
- Key features:
- Based on
nvcr.io/nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04
. - Installs essential tools and libraries, including:
ffmpeg
,libturbojpeg
,exiftool
,python3-pip
, and more.
- Based on
3. Updates in ONNXEngine Module
capybara/onnxengine/__init__.py
- Added a new import:
ONNXEngineIOBinding
fromengine_io_binding
.
capybara/onnxengine/engine.py
- Enhanced
__repr__
method:- Added utility to remove ANSI escape codes for cleaner output.
- Improved formatting of nested dictionaries and centered title text.
- Refactored
format_nested_dict
to handle more complex data structures.
New Module: capybara/onnxengine/engine_io_binding.py
- Introduced a new class
ONNXEngineIOBinding
:- Implements advanced input-output binding for ONNXRuntime.
- Supports GPU execution with enhanced session configuration options.
- Handles nested input-output information for models dynamically.
4. Test Suite Enhancements
New Tests
tests/onnxruntime/test_engine.py
:- Validates
ONNXEngine
functionality with randomized inputs. - Ensures model outputs differ across runs.
- Validates
tests/onnxruntime/test_engine_io_binding.py
:- Tests
ONNXEngineIOBinding
with dynamic input initializations. - Verifies output correctness and variance across executions.
- Tests
New Resource
- ONNX Model (
tests/resources/model.onnx
):- Added a sample ONNX model for testing purposes.
Full Changelog: 0.6.0...0.7.0
Release 0.6.0
Release Note
- Fixing a bug in the
prepare_box
function. The argument namedsrc_mode
should be based on input when input is acb.Box
. - Add
get_onnx_input_infos
andget_onnx_output_infos
.
What's Changed
- [F] Fix prepare_box of src_mode by @kunkunlin1221 in #17
- [A] add tools for onnxengine by @kunkunlin1221 in #16
Full Changelog: 0.5.2...0.6.0
Release 0.5.2
Release Note
Remove download_from_docsaid
The cloud.docsaid.org server, previously hosted on GCP, had its access permissions expire on January 1, 2025. Consequently, the server has been decommissioned.
To maintain functionality, all download operations have been seamlessly migrated to Google Drive, utilizing the download_from_google
function.
Full Changelog: 0.5.1...0.5.2
Release 0.5.1
Release Note
- [A] Add new function
download_from_google
. - [C Update font download from google drive.
Full Changelog: 0.4.0...0.5.1
Release 0.4.0
Release Note
What's Changed
- Feat/enhance imwarp quadrangle by @zephyr-sh in #14
Full Changelog: 0.3.1...0.4.0
Release 0.3.1
Release 0.3.0
Release Note
Add public PyPI supporting.
- [A] Add long_description_content_type to setup file.
- [C] Update README.md
Full Changelog: 0.2.0...0.3.0
Release 0.2.0
Release Note
Ready for macos and windows system
What's Changed
- [C] add imresize_and_pad_if_need by @kunkunlin1221 in #12
- [C] Remove
pyheif
Installation on Non-Linux Platforms by @kunkunlin1221 in #13
Full Changelog: 0.1.1...0.2.0
Release 0.1.1
Release Note
What's Changed
- [F] Fixed error convert to list in
draw_polygon
by @zephyr-sh in #10 - [A] make keypoints and keypointslist can eat themselves by @kunkunlin1221 in #11
Full Changelog: 0.1.0...0.1.1