Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Pysjtu | 33 | 2 months ago | 8 | December 21, 2020 | 1 | gpl-3.0 | HTML | |||
The Python iSJTU client for Humans. | ||||||||||
Onnx2json | 18 | 2 months ago | mit | Python | ||||||
Exports the ONNX file to a JSON file and JSON dict. | ||||||||||
Json2onnx | 13 | 6 months ago | mit | Python | ||||||
Converts a JSON file to an ONNX file. | ||||||||||
Sed4onnx | 5 | 1 | 3 months ago | 2 | May 25, 2022 | mit | Python | |||
Simple ONNX constant encoder/decoder. Since the constant values in the JSON files generated by onnx2json are Base64-encoded values, ASCII <-> Base64 conversion is required when rewriting JSON constant values. |
Converts a JSON file to an ONNX file. Click here for onnx2json.
PINTO0309/simple-onnx-processing-tools
### option
$ echo export PATH="~/.local/bin:$PATH" >> ~/.bashrc \
&& source ~/.bashrc
### run
$ pip install -U onnx protobuf \
&& python3 -m pip install -U onnx_graphsurgeon --index-url https://pypi.ngc.nvidia.com \
&& pip install -U json2onnx
PINTO0309/simple-onnx-processing-tools
usage:
json2onnx [-h]
--ij INPUT_JSON_PATH
-of OUTPUT_ONNX_FILE_PATH
optional arguments:
-h, --help
show this help message and exit
-ij INPUT_JSON_PATH, --input_json_path INPUT_JSON_PATH
Input JSON file path (*.json)
-of OUTPUT_ONNX_FILE_PATH, --output_onnx_file_path OUTPUT_ONNX_FILE_PATH
Output ONNX model path (*.onnx)
>>> from json2onnx import convert
>>> help(convert)
Help on function convert in module json2onnx.json2onnx:
convert(
input_json_path: Union[str, NoneType] = '',
json_dict: Union[dict, NoneType] = None,
output_onnx_file_path: Union[str, NoneType] = ''
)
Parameters
----------
input_json_path: Optional[str]
Input onnx file path.
Either input_json_path or json_dict must be specified.
Default: ''
json_dict: Optional[dict]
onnx.ModelProto.
Either input_onnx_file_path or json_dict must be specified.
json_dict If specified, ignore input_json_path and process json_dict.
output_onnx_file_path: Optional[str]
Output onnx file path. If not specified, no ONNX file is output.
Default: ''
Returns
-------
onnx_graph: onnx.ModelProto
Converted ONNX.
$ json2onnx \
--input_json_path NonMaxSuppression.json \
--output_onnx_file_path NonMaxSuppression.onnx
from json2onnx import convert
onnx_graph = convert(
input_json_path="NonMaxSuppression.json",
output_onnx_file_path="NonMaxSuppression.onnx",
)
# or
onnx_graph = convert(
input_json_path="NonMaxSuppression.json",
)
# or
onnx_graph = convert(
json_dict=json_data,
output_onnx_file_path="NonMaxSuppression.onnx",
)
# or
onnx_graph = convert(
json_dict=json_data,
)
https://github.com/PINTO0309/simple-onnx-processing-tools/issues