scc4onnx
Very simple NCHW and NHWC conversion tool for ONNX. Change to the specified input order for each and every input OP. Also, change the channel order of RGB and BGR. Simple Channel Converter for ONNX. Simple Channel Conversion for ONNX.
Decision gist · record as of 2026-08-14
Yes, if you work with ONNX models and need to adapt input tensor layouts or channel ordering. The package is lightweight, has no runtime dependencies, and carries permissive licensing. The aging maintenance status (last release 487 days ago) is a minor concern for a stable utility tool, but check whether your ONNX and onnx_graphsurgeon versions are compatible before relying on it in production.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires onnx and onnx_graphsurgeon to be installed separately (not listed as package dependencies but referenced in setup documentation).
- Low friction: pure Python wheel with no runtime dependencies.
- Maintenance is aging (487 days since last release), though the repository remains active and the package has been stable since its 2022 release.
License · maintenance · safety
MIT License (permissive) — MIT License permits unrestricted use, modification, and distribution with minimal obligations—suitable for most commercial and open-source projects.
last release 2025-04-14 (487 days) · last repo commit 2025-04-14 · 25 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 82,968 downloads/mo, #14,114 on PyPI
Alternatives
Verify before relying
# CLI usage
$ pip install scc4onnx
$ scc4onnx --input_onnx_file_path model.onnx --output_onnx_file_path model_converted.onnx --input_op_names_and_order_dims input_op [0,2,3,1]
# Python usage
from scc4onnx import order_conversion
converted = order_conversion(
input_onnx_file_path='model.onnx',
output_onnx_file_path='model_converted.onnx',
input_op_names_and_order_dims={'input_op': [0,2,3,1]}
)- Whether onnx and onnx_graphsurgeon are truly optional or required at runtime despite not appearing in the dependency list.
- Scope of tensor dimension support beyond the documented NCHW/NHWC examples.
What it is and what it does
scc4onnx is a command-line and Python library tool for modifying ONNX model input specifications. It rewrites the dimension order of named input operations and optionally swaps RGB/BGR channel ordering, then inserts Transpose operations after the input to preserve downstream model behavior. The tool works by accepting a source ONNX file, applying the specified transformations, and writing a modified model file—or by accepting an in-memory ONNX graph object for programmatic use.
The package supports arbitrary tensor dimensions (not limited to 4D), allowing flexible reordering of any axis. It is typically used when adapting pre-trained models to different input conventions—for example, converting a model trained on NCHW-format images to accept NHWC input, or swapping color channel order to match a different preprocessing pipeline. The transformations are non-destructive: the model's internal computation graph remains unchanged, with the transpose operations ensuring outputs remain semantically identical.
Use it for
- Convert a computer vision model from NCHW to NHWC format to match a different inference framework's input convention.
- Swap RGB to BGR channel ordering on model inputs to align with preprocessing pipelines that use different color spaces.
- Adapt stereo or multi-input models by reordering dimensions on multiple named inputs simultaneously.
- Prepare ONNX models for deployment on hardware or frameworks that expect specific tensor layouts.
- Batch-process multiple ONNX models via CLI to standardize input formats across a model zoo.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with ONNX models and need to adapt input tensor layouts or channel ordering.
The package is lightweight, has no runtime dependencies, and carries permissive licensing. The aging maintenance status (last release 487 days ago) is a minor concern for a stable utility tool, but check whether your ONNX and onnx_graphsurgeon versions are compatible before relying on it in production.
Install
scc4onnx on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Maintenance is aging (487 days since last release), though the repository remains active and the package has been stable since its 2022 release.
Requires onnx and onnx_graphsurgeon to be installed separately (not listed as package dependencies but referenced in setup documentation).
License in practice
MIT License permits unrestricted use, modification, and distribution with minimal obligations—suitable for most commercial and open-source projects.
Quickstart
# CLI usage
$ pip install scc4onnx
$ scc4onnx --input_onnx_file_path model.onnx --output_onnx_file_path model_converted.onnx --input_op_names_and_order_dims input_op [0,2,3,1]
# Python usage
from scc4onnx import order_conversion
converted = order_conversion(
input_onnx_file_path='model.onnx',
output_onnx_file_path='model_converted.onnx',
input_op_names_and_order_dims={'input_op': [0,2,3,1]}
)
Verify before relying
- Whether onnx and onnx_graphsurgeon are truly optional or required at runtime despite not appearing in the dependency list.
- Scope of tensor dimension support beyond the documented NCHW/NHWC examples.
Package facts
| License | MIT License permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 487 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 82,968 / month, #14,114 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: scc4onnx-1.0.7-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “ONNX tensor dimension conversion”
- scc4onnxConverts ONNX model input tensor dimensions and channel ordering…
- ssi4onnxInfers and fills missing tensor shape information in ONNX model…
- sbi4onnxModifies ONNX model files to initialize or replace their batch size…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also sng4onnx · sbi4onnx · sio4onnx · scs4onnx · svs4onnx · soc4onnx · ssi4onnx · snc4onnx · sor4onnx · snd4onnx