ConvNeXt V2

ConvNeXt V2 is an image classifier with global response normalization.

Tarefas
classification
Instalação
pip install libreyolo
Nível de suporte
Compatível, desde a v1.6.0. Modelos treináveis complementares: mantidos verdes na CI, com recursos incorporados quando há oportunidade.
Origem
ConvNeXt V2 por Meta AI, MIT code; CC-BY-NC-4.0 weights. Artigo, código-fonte
Licenças
Código MIT, pesos MIT code; CC-BY-NC-4.0 weights. Uso comercial

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

TarefaONNXTorchScriptExecuTorchTensorRTOpenVINOPaddleMNNRKNNncnnTFLiteCoreMLCore AI
ClassificationClassification to ONNX: compatívelClassification to TorchScript: compatívelClassification to ExecuTorch: compatívelClassification to TensorRT: compatívelClassification to OpenVINO: compatívelClassification to Paddle: incompatívelClassification to MNN: incompatívelClassification to RKNN: incompatívelClassification to ncnn: compatívelClassification to TFLite: incompatívelClassification to CoreML: incompatívelClassification to Core AI: incompatível
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

ArquivoLicença dos pesos
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

Todos os arquivos acima existem hoje na organização LibreYOLO e são baixados no primeiro uso.

Licensing

Confira a licença no repositório do Hugging Face correspondente aos pesos que você baixar. Cada checkpoint na organização LibreYOLO tem uma licença, e ela nem sempre é a mesma em toda a família. Esse repositório é a fonte oficial. O resumo abaixo descreve o que se aplicava na última verificação desta página.

Esta é uma descrição das licenças envolvidas, não uma orientação jurídica. Se a resposta tiver importância comercial, leia as licenças e procure sua própria assessoria.

Trabalho original
ConvNeXt V2, Meta AI
Licença original
MIT code; CC-BY-NC-4.0 weights
Código do LibreYOLO
MIT
Pesos
MIT code; CC-BY-NC-4.0 weights, republicado em huggingface.co/LibreYOLO
Interpretação
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},
}

Copiado do bloco de citação dos autores em raw.githubusercontent.com/facebookresearch/ConvNeXt-V2/main/README.md.

Verificado com o LibreYOLO v1.6.0. As tabelas de suporte, os checkpoints e os números de benchmark desta página são gerados a partir da biblioteca lançada e dos pesos publicados, não escritos à mão.