Markdownで表示

ConvNeXt V2

ConvNeXt V2 is an image classifier with global response normalization.

タスク
classification
インストール
pip install libreyolo
サポートティア
サポート対象、v1.6.0以降。補助的な学習可能モデル:CIで正常な状態を維持し、機能は機会に応じて追加されます。
アップストリーム
Meta AIのConvNeXt V2、MIT code; CC-BY-NC-4.0 weights。論文、ソース
ライセンス
コード:MIT、重み:MIT code; CC-BY-NC-4.0 weights。商用利用

Install

bash
pip install "libreyolo"

Predict

Python
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreConvNeXtV2atto-cls.pt", device="cpu")result = model(SAMPLE_IMAGE)print(result.probs)

The eight sizes run classification at 224 pixels. Official pretrained weights are CC-BY-NC-4.0.

Train

Training rebuilds the classification head for an ImageFolder dataset. cls_pw accepts values from 0 to 1 and defaults to 0. class_weights=True selects the alternative sample-normalized weighting; it cannot combine with cls_pw>0. Weighting settings must match when resuming.

Dataset setup describes the required training data.

Python
from libreyolo import LibreYOLO model = LibreYOLO("LibreConvNeXtV2atto-cls.pt", device="cpu")# "smoke10" auto-downloads; for your own data, pass a folder with train/ and val/ class subfolders.model.train(data="smoke10", epochs=1, device="cpu", workers=0)

Validate

Python
from libreyolo import LibreYOLO model = LibreYOLO("LibreConvNeXtV2atto-cls.pt", device="cpu")metrics = model.val(data="smoke10", workers=0)print(metrics)

Use the dataset format for this task. Validation explains the dataset requirements and returned metrics.

Export

タスクONNXTorchScriptExecuTorchTensorRTOpenVINOPaddleMNNRKNNncnnTFLiteCoreMLCore AI
ClassificationClassification to ONNX:対応Classification to TorchScript:対応Classification to ExecuTorch:対応Classification to TensorRT:対応Classification to OpenVINO:対応Classification to Paddle:非対応Classification to MNN:非対応Classification to RKNN:非対応Classification to ncnn:対応Classification to TFLite:非対応Classification to CoreML:非対応Classification to Core AI:非対応
Python
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreConvNeXtV2atto-cls.pt", device="cpu")model.export(format="onnx")

Export setup lists format dependencies and loading exported artifacts.

Checkpoints

ファイル重みのライセンス
Classification
LibreConvNeXtV2atto-cls.ptcc-by-nc-4.0
LibreConvNeXtV2femto-cls.ptcc-by-nc-4.0
LibreConvNeXtV2pico-cls.ptcc-by-nc-4.0
LibreConvNeXtV2n-cls.ptcc-by-nc-4.0
LibreConvNeXtV2t-cls.ptcc-by-nc-4.0
LibreConvNeXtV2b-cls.ptcc-by-nc-4.0
LibreConvNeXtV2l-cls.ptcc-by-nc-4.0
LibreConvNeXtV2h-cls.ptcc-by-nc-4.0

上記のすべてのファイルは現在LibreYOLO orgにあり、初回使用時にダウンロードされます。

Licensing

ダウンロードする特定の重みについて、Hugging Faceリポジトリのライセンスを確認してください。LibreYOLO orgの各チェックポイントにはライセンスが付与されており、同じファミリー内でも常に同一とは限りません。そのリポジトリが正式な情報源です。以下の概要は、このページを最後に検証した時点で適用されていた内容を示します。

これは関連するライセンスの説明であり、法的助言ではありません。商用上重要な場合は、自分でライセンスを読み、専門家の助言を受けてください。

原著作物
ConvNeXt V2, Meta AI
アップストリームのライセンス
MIT code; CC-BY-NC-4.0 weights
アップストリームのソース
github.com/facebookresearch/ConvNeXt-V2
LibreYOLOのコード
MIT
重み
MIT code; CC-BY-NC-4.0 weights、huggingface.co/LibreYOLOで再公開
解釈
The source code is MIT. Official pretrained weights are CC-BY-NC-4.0 and exclude commercial use.

Citation

@article{Woo2023ConvNeXtV2,
  title={ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders},
  author={Sanghyun Woo, Shoubhik Debnath, Ronghang Hu, Xinlei Chen, Zhuang Liu, In So Kweon and Saining Xie},
  year={2023},
  journal={arXiv preprint arXiv:2301.00808},
}

著者によるraw.githubusercontent.com/facebookresearch/ConvNeXt-V2/main/README.mdの引用ブロックからコピーしています。

LibreYOLO v1.6.0で検証済みです。このページのサポート表、チェックポイント、ベンチマーク値は手作業で記述したものではなく、リリース済みライブラリと公開済みの重みから生成されています。