{"id":26450441,"url":"https://github.com/risteon/tf_quat2rot","last_synced_at":"2026-05-20T10:47:49.478Z","repository":{"id":57474877,"uuid":"192002592","full_name":"risteon/tf_quat2rot","owner":"risteon","description":":triangular_ruler: Numerically stable conversion between quaternion and rotation matrices in tensorflow.","archived":false,"fork":false,"pushed_at":"2020-10-04T14:08:04.000Z","size":27,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-04T06:40:05.178Z","etag":null,"topics":["hacktoberfest","quaternion-calculation","quaternions","rotation-matrices","tensorflow","tensorflow2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/risteon.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}},"created_at":"2019-06-14T20:33:36.000Z","updated_at":"2024-05-26T23:08:29.000Z","dependencies_parsed_at":"2022-09-10T04:05:05.049Z","dependency_job_id":null,"html_url":"https://github.com/risteon/tf_quat2rot","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/risteon/tf_quat2rot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/risteon%2Ftf_quat2rot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/risteon%2Ftf_quat2rot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/risteon%2Ftf_quat2rot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/risteon%2Ftf_quat2rot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/risteon","download_url":"https://codeload.github.com/risteon/tf_quat2rot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/risteon%2Ftf_quat2rot/sbom","scorecard":{"id":777382,"data":{"date":"2025-08-11","repo":{"name":"github.com/risteon/tf_quat2rot","commit":"f308cab83e552300c274b733dd6cc5609269feb4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 2/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T03:56:38.201Z","repository_id":57474877,"created_at":"2025-08-23T03:56:38.202Z","updated_at":"2025-08-23T03:56:38.202Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33255862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T04:48:54.280Z","status":"ssl_error","status_checked_at":"2026-05-20T04:48:10.851Z","response_time":356,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["hacktoberfest","quaternion-calculation","quaternions","rotation-matrices","tensorflow","tensorflow2"],"created_at":"2025-03-18T15:38:13.246Z","updated_at":"2026-05-20T10:47:49.455Z","avatar_url":"https://github.com/risteon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tf_quat2rot\n[![Build Status](https://travis-ci.org/risteon/tf_quat2rot.svg?branch=master)](https://travis-ci.org/risteon/tf_quat2rot)\n[![License](https://img.shields.io/pypi/l/tf-quat2rot)](https://pypi.org/project/tf-quat2rot/)\n[![PyPI version](https://img.shields.io/pypi/v/tf-quat2rot)](https://pypi.org/project/tf-quat2rot/)\n\nConvert between quaternion and rotation matrices in tensorflow.\n\n\nImplements the method from Soheil Sarabandi and Federico Thomas to compute rotation matrices\nfrom quaternions.\nThis method is numerically stable.\n\nWritten in pure tensorflow.\n\n## Installation\n\nPython Versions from 3.5+ are supported. Install from PyPi with `pip install tf_quat2rot`.\n`tf_quat2rot` requires TensorFlow (versions 1.x and 2.x work). If you want it to be installed when installing `tf_quat2rot` choose between the CPU and GPU version with `pip install tf_quat2rot[tf-cpu]` or `pip install tf_quat2rot[tf-gpu]` respectively.\n\n## Definitions and sample usage\n\nQuaternions are defined as `w-x-y-z`. `w` is defined as positive. Usage is straightforward:\n\n```python3\n\u003e\u003e\u003e import tensorflow as tf\n\u003e\u003e\u003e if int(tf.__version__.split('.')[0]) \u003c 2:\n\u003e\u003e\u003e     tf.enable_eager_execution()\n\n\u003e\u003e\u003e from tf_quat2rot import quaternion_to_rotation_matrix, rotation_matrix_to_quaternion\n\n\u003e\u003e\u003e r = quaternion_to_rotation_matrix(tf.constant([1.0, 0.0, 0.0, 0.0]))\n\u003e\u003e\u003e print(r)\ntf.Tensor(\n[[1. 0. 0.]\n [0. 1. 0.]\n [0. 0. 1.]], shape=(3, 3), dtype=float32)\n\n\u003e\u003e\u003e q = rotation_matrix_to_quaternion(tf.eye(3))\n\u003e\u003e\u003e print(q)\ntf.Tensor([ 1. -0. -0. -0.], shape=(4,), dtype=float32)\n```\n\nQuaternion and rotation matrix tensors can hold arbitrary leading dimensions which will\nbe preserved.\n\nUse `random_uniform_quaternion` to generate quaternions uniformly from SO(3).\n\n## References\nSarabandi, S., \u0026 Thomas, F. (2019). Accurate Computation of Quaternions from Rotation Matrices.\nAdvances in Robot Kinematics 2018, 39–46. https://doi.org/10.1007/978-3-319-93188-3_5\n\nSteven M LaValle. Generating a random element of SO(3). http://planning.cs.uiuc.edu/node198.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fristeon%2Ftf_quat2rot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fristeon%2Ftf_quat2rot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fristeon%2Ftf_quat2rot/lists"}