ssc4onnx


Namessc4onnx JSON
Version 1.0.8 PyPI version JSON
download
home_pagehttps://github.com/PINTO0309/ssc4onnx
SummaryChecker with simple ONNX model structure. Simple Structure Checker for ONNX.
upload_time2023-09-24 01:23:35
maintainer
docs_urlNone
authorKatsuya Hyodo
requires_python>=3.6
licenseMIT License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ssc4onnx
Checker with simple ONNX model structure. **S**imple **S**tructure **C**hecker for **ONNX**.

https://github.com/PINTO0309/simple-onnx-processing-tools

[![Downloads](https://static.pepy.tech/personalized-badge/ssc4onnx?period=total&units=none&left_color=grey&right_color=brightgreen&left_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)

<p align="center">
  <img src="https://user-images.githubusercontent.com/33194443/170718388-a30d9c72-be08-4d13-b3e6-d089fe3f93da.png" />
</p>

# Key concept
- Analyzes and displays the structure of huge size models that cannot be displayed by Netron.

## 1. Setup

### 1-1. HostPC
```bash
### option
$ echo export PATH="~/.local/bin:$PATH" >> ~/.bashrc \
&& source ~/.bashrc

### run
$ pip install -U onnx rich onnxruntime \
&& pip install -U ssc4onnx \
&& python -m pip install onnx_graphsurgeon \
      --index-url https://pypi.ngc.nvidia.com
```
### 1-2. Docker
https://github.com/PINTO0309/simple-onnx-processing-tools#docker

## 2. CLI Usage
```
$ ssc4onnx -h

usage:
    ssc4onnx [-h]
    -if INPUT_ONNX_FILE_PATH

optional arguments:
  -h, --help
        show this help message and exit.

  -if INPUT_ONNX_FILE_PATH, --input_onnx_file_path INPUT_ONNX_FILE_PATH
        Input onnx file path.
```

## 3. In-script Usage
```python
>>> from ssc4onnx import structure_check
>>> help(structure_check)

Help on function structure_check in module ssc4onnx.onnx_structure_check:

structure_check(
    input_onnx_file_path: Union[str, NoneType] = '',
    onnx_graph: Union[onnx.onnx_ml_pb2.ModelProto, NoneType] = None
) -> Tuple[Dict[str, int], int]

    Parameters
    ----------
    input_onnx_file_path: Optional[str]
        Input onnx file path.
        Either input_onnx_file_path or onnx_graph must be specified.
        Default: ''

    onnx_graph: Optional[onnx.ModelProto]
        onnx.ModelProto.
        Either input_onnx_file_path or onnx_graph must be specified.
        onnx_graph If specified, ignore input_onnx_file_path and process onnx_graph.

    Returns
    -------
    op_num: Dict[str, int]
        Num of every op
    model_size: int
        Model byte size
```

## 4. CLI Execution
```bash
$ ssc4onnx -if deqflow_b_things_opset12_192x320.onnx
```

## 5. In-script Execution
```python
from ssc4onnx import structure_check

structure_check(
  input_onnx_file_path="deqflow_b_things_opset12_192x320.onnx",
)
```

## 6. Sample
https://github.com/PINTO0309/ssc4onnx/releases/download/1.0.6/deqflow_b_things_opset12_192x320.onnx

https://github.com/PINTO0309/ssc4onnx/assets/33194443/fd6a4aa2-9ed5-492b-82ae-1f8306af5119

![image](https://github.com/PINTO0309/ssc4onnx/assets/33194443/45343c95-dbb9-471c-8718-3d0a4d653250)

## 7. Reference
1. https://github.com/onnx/onnx/blob/main/docs/Operators.md
2. https://docs.nvidia.com/deeplearning/tensorrt/onnx-graphsurgeon/docs/index.html
3. https://github.com/NVIDIA/TensorRT/tree/main/tools/onnx-graphsurgeon
4. https://github.com/PINTO0309/simple-onnx-processing-tools
5. https://github.com/PINTO0309/PINTO_model_zoo

## 8. Issues
https://github.com/PINTO0309/simple-onnx-processing-tools/issues

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PINTO0309/ssc4onnx",
    "name": "ssc4onnx",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Katsuya Hyodo",
    "author_email": "rmsdh122@yahoo.co.jp",
    "download_url": "https://files.pythonhosted.org/packages/2b/a1/c15d8876de6ce80e88680f88e42ee2932b8a5dd2f619cee8886d0f3d3407/ssc4onnx-1.0.8.tar.gz",
    "platform": "linux",
    "description": "# 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&units=none&left_color=grey&right_color=brightgreen&left_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<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/33194443/170718388-a30d9c72-be08-4d13-b3e6-d089fe3f93da.png\" />\n</p>\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\" >> ~/.bashrc \\\n&& source ~/.bashrc\n\n### run\n$ pip install -U onnx rich onnxruntime \\\n&& pip install -U ssc4onnx \\\n&& 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>>> from ssc4onnx import structure_check\n>>> 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) -> 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",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Checker with simple ONNX model structure. Simple Structure Checker for ONNX.",
    "version": "1.0.8",
    "project_urls": {
        "Homepage": "https://github.com/PINTO0309/ssc4onnx"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9475ed24e1662eb178bfbe3d93617c90cbb51ad02ac89f8de5e36468971c8fe2",
                "md5": "9d41faf18ffcf5e73a19b58e072b1945",
                "sha256": "6579d2315b142d0e23d40c7dc25bef6542e450b8e755a9f68693e58ccc9175db"
            },
            "downloads": -1,
            "filename": "ssc4onnx-1.0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9d41faf18ffcf5e73a19b58e072b1945",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6616,
            "upload_time": "2023-09-24T01:23:34",
            "upload_time_iso_8601": "2023-09-24T01:23:34.444323Z",
            "url": "https://files.pythonhosted.org/packages/94/75/ed24e1662eb178bfbe3d93617c90cbb51ad02ac89f8de5e36468971c8fe2/ssc4onnx-1.0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2ba1c15d8876de6ce80e88680f88e42ee2932b8a5dd2f619cee8886d0f3d3407",
                "md5": "936b17a1612c2b1d501e0880d26c4bf5",
                "sha256": "0d13c74d8ab96cae1a0598a08879f69eb6e17a61de942eb73c6f5f2caacf28e2"
            },
            "downloads": -1,
            "filename": "ssc4onnx-1.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "936b17a1612c2b1d501e0880d26c4bf5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 5993,
            "upload_time": "2023-09-24T01:23:35",
            "upload_time_iso_8601": "2023-09-24T01:23:35.876235Z",
            "url": "https://files.pythonhosted.org/packages/2b/a1/c15d8876de6ce80e88680f88e42ee2932b8a5dd2f619cee8886d0f3d3407/ssc4onnx-1.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-24 01:23:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PINTO0309",
    "github_project": "ssc4onnx",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ssc4onnx"
}
        
Elapsed time: 0.11414s