{"id":15935052,"url":"https://github.com/pinto0309/ssc4onnx","last_synced_at":"2025-07-07T15:36:05.423Z","repository":{"id":57697716,"uuid":"496971841","full_name":"PINTO0309/ssc4onnx","owner":"PINTO0309","description":"Checker with simple ONNX model structure. Simple Structure Checker for ONNX.","archived":false,"fork":false,"pushed_at":"2023-09-24T01:22:52.000Z","size":29744,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-03T00:57:13.220Z","etag":null,"topics":["cli","model-converter","models","onnx","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/PINTO0309.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}},"created_at":"2022-05-27T11:31:02.000Z","updated_at":"2024-11-22T16:02:47.000Z","dependencies_parsed_at":"2025-03-24T21:43:16.272Z","dependency_job_id":null,"html_url":"https://github.com/PINTO0309/ssc4onnx","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/PINTO0309/ssc4onnx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PINTO0309%2Fssc4onnx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PINTO0309%2Fssc4onnx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PINTO0309%2Fssc4onnx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PINTO0309%2Fssc4onnx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PINTO0309","download_url":"https://codeload.github.com/PINTO0309/ssc4onnx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PINTO0309%2Fssc4onnx/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264103656,"owners_count":23557978,"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":["cli","model-converter","models","onnx","python"],"created_at":"2024-10-07T03:22:27.425Z","updated_at":"2025-07-07T15:36:05.405Z","avatar_url":"https://github.com/PINTO0309.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ssc4onnx\nChecker with simple ONNX model structure. **S**imple **S**tructure **C**hecker for **ONNX**.\n\nhttps://github.com/PINTO0309/simple-onnx-processing-tools\n\n[![Downloads](https://static.pepy.tech/personalized-badge/ssc4onnx?period=total\u0026units=none\u0026left_color=grey\u0026right_color=brightgreen\u0026left_text=Downloads)](https://pepy.tech/project/ssc4onnx) ![GitHub](https://img.shields.io/github/license/PINTO0309/ssc4onnx?color=2BAF2B) [![PyPI](https://img.shields.io/pypi/v/ssc4onnx?color=2BAF2B)](https://pypi.org/project/ssc4onnx/) [![CodeQL](https://github.com/PINTO0309/ssc4onnx/workflows/CodeQL/badge.svg)](https://github.com/PINTO0309/ssc4onnx/actions?query=workflow%3ACodeQL)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/33194443/170718388-a30d9c72-be08-4d13-b3e6-d089fe3f93da.png\" /\u003e\n\u003c/p\u003e\n\n# Key concept\n- Analyzes and displays the structure of huge size models that cannot be displayed by Netron.\n\n## 1. Setup\n\n### 1-1. HostPC\n```bash\n### option\n$ echo export PATH=\"~/.local/bin:$PATH\" \u003e\u003e ~/.bashrc \\\n\u0026\u0026 source ~/.bashrc\n\n### run\n$ pip install -U onnx rich onnxruntime \\\n\u0026\u0026 pip install -U ssc4onnx \\\n\u0026\u0026 python -m pip install onnx_graphsurgeon \\\n      --index-url https://pypi.ngc.nvidia.com\n```\n### 1-2. Docker\nhttps://github.com/PINTO0309/simple-onnx-processing-tools#docker\n\n## 2. CLI Usage\n```\n$ ssc4onnx -h\n\nusage:\n    ssc4onnx [-h]\n    -if INPUT_ONNX_FILE_PATH\n\noptional arguments:\n  -h, --help\n        show this help message and exit.\n\n  -if INPUT_ONNX_FILE_PATH, --input_onnx_file_path INPUT_ONNX_FILE_PATH\n        Input onnx file path.\n```\n\n## 3. In-script Usage\n```python\n\u003e\u003e\u003e from ssc4onnx import structure_check\n\u003e\u003e\u003e help(structure_check)\n\nHelp on function structure_check in module ssc4onnx.onnx_structure_check:\n\nstructure_check(\n    input_onnx_file_path: Union[str, NoneType] = '',\n    onnx_graph: Union[onnx.onnx_ml_pb2.ModelProto, NoneType] = None\n) -\u003e Tuple[Dict[str, int], int]\n\n    Parameters\n    ----------\n    input_onnx_file_path: Optional[str]\n        Input onnx file path.\n        Either input_onnx_file_path or onnx_graph must be specified.\n        Default: ''\n\n    onnx_graph: Optional[onnx.ModelProto]\n        onnx.ModelProto.\n        Either input_onnx_file_path or onnx_graph must be specified.\n        onnx_graph If specified, ignore input_onnx_file_path and process onnx_graph.\n\n    Returns\n    -------\n    op_num: Dict[str, int]\n        Num of every op\n    model_size: int\n        Model byte size\n```\n\n## 4. CLI Execution\n```bash\n$ ssc4onnx -if deqflow_b_things_opset12_192x320.onnx\n```\n\n## 5. In-script Execution\n```python\nfrom ssc4onnx import structure_check\n\nstructure_check(\n  input_onnx_file_path=\"deqflow_b_things_opset12_192x320.onnx\",\n)\n```\n\n## 6. Sample\nhttps://github.com/PINTO0309/ssc4onnx/releases/download/1.0.6/deqflow_b_things_opset12_192x320.onnx\n\nhttps://github.com/PINTO0309/ssc4onnx/assets/33194443/fd6a4aa2-9ed5-492b-82ae-1f8306af5119\n\n![image](https://github.com/PINTO0309/ssc4onnx/assets/33194443/45343c95-dbb9-471c-8718-3d0a4d653250)\n\n## 7. Reference\n1. https://github.com/onnx/onnx/blob/main/docs/Operators.md\n2. https://docs.nvidia.com/deeplearning/tensorrt/onnx-graphsurgeon/docs/index.html\n3. https://github.com/NVIDIA/TensorRT/tree/main/tools/onnx-graphsurgeon\n4. https://github.com/PINTO0309/simple-onnx-processing-tools\n5. https://github.com/PINTO0309/PINTO_model_zoo\n\n## 8. Issues\nhttps://github.com/PINTO0309/simple-onnx-processing-tools/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinto0309%2Fssc4onnx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinto0309%2Fssc4onnx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinto0309%2Fssc4onnx/lists"}