ConvNeXt V2
ConvNeXt V2 is an image classifier with global response normalization.
- Task
- classification
- Installa
pip install libreyolo- Livello di supporto
- Supportato, dalla v1.6.0. Modelli addestrabili di supporto: mantenuti funzionanti nella CI, ricevono nuove funzionalità quando possibile.
- Licenze
- Codice MIT, pesi MIT code; CC-BY-NC-4.0 weights. Uso commerciale
Install
pip install "libreyolo"Predict
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.
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
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
| Task | ONNX | TorchScript | ExecuTorch | TensorRT | OpenVINO | Paddle | MNN | RKNN | ncnn | TFLite | CoreML | Core AI |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Classification | Classification to ONNX: supportato | Classification to TorchScript: supportato | Classification to ExecuTorch: supportato | Classification to TensorRT: supportato | Classification to OpenVINO: supportato | Classification to Paddle: non supportato | Classification to MNN: non supportato | Classification to RKNN: non supportato | Classification to ncnn: supportato | Classification to TFLite: non supportato | Classification to CoreML: non supportato | Classification to Core AI: non supportato |
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
| File | Licenza dei pesi |
|---|---|
| Classification | |
| LibreConvNeXtV2atto-cls.pt | cc-by-nc-4.0 |
| LibreConvNeXtV2femto-cls.pt | cc-by-nc-4.0 |
| LibreConvNeXtV2pico-cls.pt | cc-by-nc-4.0 |
| LibreConvNeXtV2n-cls.pt | cc-by-nc-4.0 |
| LibreConvNeXtV2t-cls.pt | cc-by-nc-4.0 |
| LibreConvNeXtV2b-cls.pt | cc-by-nc-4.0 |
| LibreConvNeXtV2l-cls.pt | cc-by-nc-4.0 |
| LibreConvNeXtV2h-cls.pt | cc-by-nc-4.0 |
Oggi tutti i file elencati sopra sono presenti nell<link>organizzazione LibreYOLO</link> e vengono scaricati al primo utilizzo.
Licensing
Controlla la licenza nel repository Hugging Face degli specifici pesi che scarichi. Ogni checkpoint nell<link>organizzazione LibreYOLO</link> ne include una e non è sempre la stessa per tutta la famiglia. Quel repository è la fonte autorevole; il riepilogo seguente descrive le condizioni applicabili al momento dellultima verifica di questa pagina.
Questa è una descrizione delle licenze coinvolte, non una consulenza legale. Se la risposta è importante a fini commerciali, leggi personalmente le licenze e chiedi una consulenza indipendente.
- Lavoro originale
- ConvNeXt V2, Meta AI
- Licenza upstream
- MIT code; CC-BY-NC-4.0 weights
- Sorgente upstream
- github.com/facebookresearch/ConvNeXt-V2
- Codice LibreYOLO
- MIT
- Pesi
- MIT code; CC-BY-NC-4.0 weights, ripubblicati su huggingface.co/LibreYOLO
- Interpretazione
- 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},
}Copiato dal blocco di citazione degli autori disponibile su raw.githubusercontent.com/facebookresearch/ConvNeXt-V2/main/README.md.