{"id":19036690,"url":"https://github.com/ient/pycabac","last_synced_at":"2025-04-23T19:13:43.501Z","repository":{"id":43661058,"uuid":"407137307","full_name":"IENT/PyCabac","owner":"IENT","description":"Python port to the VTM CABAC engine via pybind11 ","archived":false,"fork":false,"pushed_at":"2025-01-16T15:40:27.000Z","size":314,"stargazers_count":25,"open_issues_count":1,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-23T19:13:30.074Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IENT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-09-16T11:24:59.000Z","updated_at":"2025-03-16T05:12:22.000Z","dependencies_parsed_at":"2023-11-29T14:26:36.491Z","dependency_job_id":"192e8720-e077-4c59-92ec-07fcc484643a","html_url":"https://github.com/IENT/PyCabac","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IENT%2FPyCabac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IENT%2FPyCabac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IENT%2FPyCabac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IENT%2FPyCabac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IENT","download_url":"https://codeload.github.com/IENT/PyCabac/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250496991,"owners_count":21440231,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T21:55:09.543Z","updated_at":"2025-04-23T19:13:43.479Z","avatar_url":"https://github.com/IENT.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PYCABAC\n\n[Easy|Educational|Extensible|Experimental] CABAC\n\nA Python port to the VTM CABAC engine\n\n---\n\n## Prerequisites\n\n### Linux, macOS\n\n* Compiler with C++11 support\n* CMake \u003e= 2.8.12\n\n### Windows\n\n* Visual Studio 2015\n* CMake \u003e= 3.1\n\n## Installation\n\nJust clone this repository and install via pip. Note the `--recursive` option which is\nneeded for the pybind11 submodule:\n\n```bash\ngit clone --recursive https://github.com/IENT/PyCabac.git\npip install .\n```\n\nWith the `setup.py` file included in this example, the `pip install .` command will\ninvoke CMake and build the pybind11 module as specified in `CMakeLists.txt`.\n\nNote: We recommend the usage of a virtual environment:\n\n```bash\npython3 -m venv venv\nsource venv/bin/activate\n```\n\nNote: Uninstall via:\n\n```bash\npip uninstall pycabac\n```\n\nIn order to be able to run the unit tests, `numpy` is required:\n\n```bash\npip install numpy\n```\n\n## Demo\n\nWe expect that you are familiar with the concept of binary arithmetic coding.\nHence, from a user perspective, it is most probably sufficient to understand how you can encode a binary sequence with PyCabac.\nFor demos, check the Python scripts in either the `demo` or the `tests` folder:\n\n* `demo/tracing.py` demonstrates how to trace the encoding process of a binary sequence. Both the MPS and the probability of the current context can be extracted for each context.\n* `tests/test_cabac.py` shows how to encode integer symbols given a specific binarization or encode binary sequences directly.\n* `tests/test_cabac_timing.py` shows different ways of encoding an integer sequence and measures encoding/decoding time for comparison.\n* `tests/test_cabac_sequence.py` shows how to encode an integer sequence given a specific binarization and a predefined context set.\n\nFor a more technical/scientific description of the probability modelling in CABAC, you may want to have a look at:\n\n```bibtex\nH. Schwarz et al., \"Quantization and Entropy Coding in the Versatile Video Coding (VVC) Standard,\" in IEEE Transactions on Circuits and Systems for Video Technology, doi: 10.1109/TCSVT.2021.3072202.\n```\n\n## Pybind11 Example\n\n```python\nimport pybind11_example\npybind11_example.add(1, 2)\n```\n\n## Python Unit Tests\n\nPython unit tests are done using Python's built-in ``unittest`` module. Note that ``numpy`` is required. Python unit tests live in the ``tests`` folder. As long as all of your files match ``'test*.py'``, ``unittest`` will automatically discover them. Run ``python3 -m unittest discover [--verbose]`` to run all unit tests.\n\n## C++ Unit Tests\n\nC++ unit tests are done using Catch2 (https://github.com/catchorg/Catch2). C++ unit tests live in the ``tests`` folder. The tests executable can be built with CMake. On Linux/macOS use the following commands to build the tests executable:\n\n```bash\nmkdir build\ncd build\ncmake .. -DCMAKE_BUILD_TYPE=Release\nmake --jobs\n```\n\nThis will leave the tests executable under ``build/tests/tests``.\n\n## Citation\n\nIf you use this software, please cite it as below.\n\n```\n@inproceedings{RoMeScVo23,\n  author = {Rohlfing, Christian and Meyer, Thibaut and Schneider, Jens and Voges, Jan},\n  title = {Python Wrapper for Context-based Adaptive Binary Arithmetic Coding},\n  booktitle = {Visual Communications and Image Processing {VCIP}~'23},\n  address = {Jeju, South Korea},\n  year = {2023},\n  month = dec,\n  doi = {10.1109/VCIP59821.2023.10402639},\n  publisher = {{IEEE}, Piscataway}\n}\n```\n\n## Who do I talk to?\n\nJan Voges \u003c[voges@tnt.uni-hannover.de](mailto:voges@tnt.uni-hannover.de)\u003e\n\nChristian Rohlfing \u003c[rohlfing@ient.rwth-aachen.de](mailto:rohlfing@ient.rwth-aachen.de)\u003e\n\nJens Schneider \u003c[schneider@ient.rwth-aachen.de](mailto:schneider@ient.rwth-aachen.de)\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fient%2Fpycabac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fient%2Fpycabac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fient%2Fpycabac/lists"}