EdgeCrafter

Vision transformer ringkas untuk prediksi dense di perangkat edge, dipublikasikan upstream sebagai tiga model bersaudara: ECDet, ECPose dan ECSeg. LibreYOLO memuat ketiganya sebagai satu family, dengan task ditentukan oleh checkpoint.

Task
detection, pose, instance segmentation
Ukuran
s, m, l, x at 640 px
Instalasi
pip install libreyolo
Tier dukungan
Inti, sejak v1.2.0. Detektor inti yang dapat dilatih: fitur menyusul tier unggulan dalam gelombang rilis yang sama.
Proyek upstream
EdgeCrafter oleh Intellindust AI Lab, Apache-2.0 original COCO weights; restricted obj2coco weights. Makalah, sumber
Lisensi
Kode Apache-2.0, bobot Apache-2.0 original COCO weights; restricted obj2coco weights. Penggunaan komersial

Instalasi

EdgeCrafter tidak memerlukan extra opsional. Semua yang diimpornya sudah tersedia di instalasi dasar.

bash
pip install libreyolo

Fine-tuning adapter dengan lora=True adalah pengecualian, dan memerlukan extra lora.

bash
pip install "libreyolo[lora]"

Prediksi

Bobot diunduh dari Hugging Face saat pertama kali dipakai lalu disimpan di cache lokal.

Python
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreECs.pt")result = model(SAMPLE_IMAGE, save=True) for box in result.boxes:    print(box.cls, box.conf, box.xyxy)
CLI
libreyolo predict model=LibreECs.pt source=https://raw.githubusercontent.com/LibreYOLO/libreyolo/release/libreyolo/assets/parkour.jpg save=True
Pose
from libreyolo import LibreYOLO, SAMPLE_IMAGE # Sufiks -pose pada nama berkas memilih head keypoint, jadi argumen# task tidak diperlukan di sini.model = LibreYOLO("LibreECs-pose.pt")result = model(SAMPLE_IMAGE, save=True) print(result.keypoints.xy)print(result.boxes.conf)
Segmentasi instance
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreECs-seg.pt")result = model(SAMPLE_IMAGE, save=True) print(result.masks.data.shape)

Task berasal dari nama berkas, jadi checkpoint -pose atau -seg memilih head-nya sendiri dan tidak menerima argumen task. Ketiganya mengembalikan objek Results yang dikembalikan setiap family, dengan tambahan result.keypoints untuk pose dan result.masks untuk segmentasi. Pose mencakup satu kelas, yaitu person, dengan 17 keypoint COCO, dan jumlahnya ditetapkan saat model dibangun. Pose tidak punya head box, jadi setiap box pose adalah rentang batas dari keypoint-nya sendiri, dan kanal keypoint ketiga berupa konstanta, bukan skor per titik.

conf dan max_det menyaring pemilihan query; iou tetap diterima demi keseragaman API tetapi tidak berpengaruh, karena ketiga head melakukan decode atas sekumpulan query tanpa langkah NMS. Lihat prediksi untuk source, streaming dan penanganan hasil.

Prediksi deteksi menerima imgsz=(height, width) persegi panjang; pelatihan dan ekspor tetap memiliki batasan bentuk masing-masing.

Varian

Empat ukuran. Semuanya berjalan pada resolusi input yang sama, jadi tabel membedakannya lewat jumlah parameter dan akurasi.

CheckpointInput (piksel)mAP 50-95Parameter (juta)
LibreECl64060.132.97
LibreECm64058.419.43
LibreECs64054.39.88
LibreECx64061.149.94

COCO val2017, 500 images. Diukur oleh perangkat benchmark LibreYOLO dan dipublikasikan di Vision Analysis, tempat latensi pada berbagai hardware dan runtime dibandingkan serta rekaman lengkap setiap pengujian tersedia.

Upstream memublikasikan ECDet, ECPose dan ECSeg sebagai tiga model terpisah, bukan satu model dengan tiga head. Ketiganya berbagi backbone ECViT dan encoder hybrid, dan hanya berbeda pada head, jadi LibreYOLO menyatukannya menjadi satu family dan membiarkan nama berkas checkpoint yang menentukan task. Karena itu huruf ukuran berarti backbone dan encoder yang sama di ketiganya, dan prediksi, validasi serta ekspor memakai argumen yang sama, mana pun yang dimuat.

Pelatihan

Ketiga task dilatih lewat train(), yang membaca task dari checkpoint yang dimuat lalu memilih trainer yang cocok.

Python
from libreyolo import LibreYOLO model = LibreYOLO("LibreECs.pt")model.train(    data="my-dataset.yaml",    epochs=50,    imgsz=640,    batch=8,    lr0=5e-4,)
CLI
libreyolo train model=LibreECs.pt data=my-dataset.yaml epochs=50 imgsz=640 batch=8 lr0=5e-4
Pose
from libreyolo import LibreYOLO # Butuh dataset keypoint satu kelas yang data.yaml-nya mendeklarasikan# kpt_shape, dan imgsz pada ukuran native checkpoint.model = LibreYOLO("LibreECs-pose.pt")model.train(    data="my-pose-dataset.yaml",    epochs=50,    imgsz=640,)
Segmentasi instance
from libreyolo import LibreYOLO # Butuh label poligon, dan imgsz pada ukuran native checkpoint.model = LibreYOLO("LibreECs-seg.pt")model.train(    data="my-dataset.yaml",    epochs=50,    imgsz=640,)
LoRA
from libreyolo import LibreYOLO model = LibreYOLO("LibreECs.pt")model.train(    data="my-dataset.yaml",    epochs=50,    lora=True,)

Yang sudah diperiksa untuk deteksi dan segmentasi: kesetaraan inferensi terhadap upstream pada 1e-5, lapisan demi lapisan dan per ukuran, serta bahwa loss dan satu langkah pelatihan berjalan pada input sintetis. Yang belum, menurut docstring train() sendiri: konvergensi fine-tune penuh, pelatihan multi-GPU, langkah stop-augmentation best-reload, dan remap kelas Objects365 ke COCO. Jalur pose mengikuti resep yang dipublikasikan DETRPose, yaitu matcher Hungarian atas biaya kelas, L1 keypoint dan OKS dengan denoising keypoint kontrastif, dan konvergensinya juga belum diperiksa dari ujung ke ujung.

Jika dibiarkan apa adanya, trainer menjalankan 74 epoch pada lr0=5e-4 dengan mixed precision aktif, mengikuti resep upstream: AdamW, jadwal cosine datar, EMA pada 0.9999 dan input yang dinormalisasi ala ImageNet. Pose dan segmentasi sama-sama mengharuskan imgsz pada ukuran native checkpoint, karena grid anchor untuk evaluasinya dibangun saat model dikonstruksi; nilai yang berbeda akan memunculkan error sebelum run dimulai. Pose juga mengharuskan dataset satu kelas yang data.yaml-nya mendeklarasikan kpt_shape, dengan jumlah keypoint yang cocok dengan head.

lora=True hanya berlaku untuk deteksi; pose dan segmentasi memunculkan ValueError jika memakainya. Di Apple silicon, trainer mempertahankan run di GPU dan mengirim satu operasi ke CPU, yaitu backward grid-sample di dalam deformable attention, yang tidak diimplementasikan PyTorch di Metal.

Lihat pelatihan untuk dataset, augmentasi, multi-GPU dan logger.

Validasi

val() mengembalikan dictionary dengan key berupa nama metrik, dan mencetak hasil per kelas jika verbose dibiarkan aktif.

Python
from libreyolo import LibreYOLO model = LibreYOLO("LibreECs.pt")metrics = model.val(data="my-dataset.yaml") print(metrics["metrics/mAP50-95"])print(metrics["metrics/mAP50"])
CLI
libreyolo val model=LibreECs.pt data=my-dataset.yaml
Pose
from libreyolo import LibreYOLO model = LibreYOLO("LibreECs-pose.pt")metrics = model.val(data="my-pose-dataset.yaml") print(metrics["metrics/keypoints_mAP50-95"])print(metrics["metrics/keypoints_mAP50"])
Segmentasi instance
from libreyolo import LibreYOLO model = LibreYOLO("LibreECs-seg.pt")metrics = model.val(data="my-dataset.yaml") print(metrics["metrics/mAP50-95(M)"])   # maskprint(metrics["metrics/mAP50-95(B)"])   # box

Pose melaporkan metrik OKS keypoint di bawah metrics/keypoints_*. Segmentasi melaporkan mask di bawah key metrics/mAP50-95 biasa dan mengulang kedua sudut pandang dalam satu pass, box di bawah (B) dan mask di bawah (M).

Ekspor

TaskONNXTorchScriptExecuTorchTensorRTOpenVINOPaddleMNNRKNNncnnTFLiteCoreMLCore AI
DetectionDetection to ONNX: didukungDetection to TorchScript: didukungDetection to ExecuTorch: didukungDetection to TensorRT: didukungDetection to OpenVINO: didukungDetection to Paddle: didukungDetection to MNN: didukungDetection to RKNN: tidak didukungDetection to ncnn: tidak didukungDetection to TFLite: tidak didukungDetection to CoreML: tidak didukungDetection to Core AI: didukung
PosePose to ONNX: didukungPose to TorchScript: didukungPose to ExecuTorch: didukungPose to TensorRT: didukungPose to OpenVINO: didukungPose to Paddle: didukungPose to MNN: tidak didukungPose to RKNN: tidak didukungPose to ncnn: tidak didukungPose to TFLite: tidak didukungPose to CoreML: tidak didukungPose to Core AI: tidak didukung
Instance segmentationInstance segmentation to ONNX: didukungInstance segmentation to TorchScript: didukungInstance segmentation to ExecuTorch: didukungInstance segmentation to TensorRT: didukungInstance segmentation to OpenVINO: didukungInstance segmentation to Paddle: didukungInstance segmentation to MNN: tidak didukungInstance segmentation to RKNN: tidak didukungInstance segmentation to ncnn: tidak didukungInstance segmentation to TFLite: tidak didukungInstance segmentation to CoreML: tidak didukungInstance segmentation to Core AI: tidak didukung

Artefak hasil ekspor dimuat kembali lewat LibreYOLO() berdasarkan sufiks berkasnya, jadi berkas .onnx atau .engine berperilaku seperti checkpoint dan mengembalikan Results yang sama. Pose dan segmentasi diekspor pada input tetap 640 kali 640, bukan shape dinamis, dan beberapa target deteksi juga memakai kanvas tetap, termasuk OpenVINO, Paddle, MNN, ExecuTorch dan Core AI. Ekspor memuat daftar argumen yang diterima setiap format dan tambahan yang disediakan sebagian di antaranya.

Python
from libreyolo import LibreYOLO model = LibreYOLO("LibreECs.pt")model.export(format="onnx", imgsz=640)model.export(format="tensorrt", imgsz=640, half=True)
CLI
libreyolo export model=LibreECs.pt format=onnx imgsz=640libreyolo export model=LibreECs-pose.pt format=onnx imgsz=640libreyolo export model=LibreECs-seg.pt format=onnx imgsz=640
Memakai berkas hasil ekspor
from libreyolo import LibreYOLO, SAMPLE_IMAGE # Factory memilih jalur berdasarkan sufiks berkas, jadi artefak hasil# ekspor dimuat seperti checkpoint biasa dan mengembalikan objek# Results yang sama.model = LibreYOLO("LibreECs.onnx")result = model(SAMPLE_IMAGE) print(result.boxes.xyxy)

Input dan output ONNX

Tensorimages float32 [batch, 3, height, width]
WarnaRGB
Penskalaanpiksel / 255
Normalisasirata-rata [0.485,0.456,0.406], simpangan baku [0.229,0.224,0.225]
Ubah ukuranregangkan ke lebar x tinggi (tanpa padding, rasio aspek tidak dipertahankan), Pillow bilinear
Cara mereproduksi resize bilinear Pillow

LibreYOLO mengubah ukuran dengan filter BILINEAR milik Pillow (Image.resize). Ini bukan OpenCV INTER_LINEAR maupun INTER_AREA: saat memperkecil, Pillow memperlebar filter sebesar faktor pengecilan, dan resize OpenCV mengubah deteksi serta menggeser kotak beberapa piksel. Untuk mereproduksinya tanpa Pillow, ubah ukuran satu sumbu, bulatkan ke 8 bit, lalu ubah ukuran sumbu lainnya dan bulatkan lagi. Per sumbu, misalkan s = in_size / out_size dan f = max(s, 1). Piksel keluaran i berpusat di c = (i + 0.5) * s dan membaca piksel sumber j dari int(c - f + 0.5) sampai int(c + f + 0.5) - 1, dibatasi pada gambar, masing-masing dengan bobot max(0, 1 - |j + 0.5 - c| / f), dibagi jumlah bobot. Pillow bekerja dengan fixed point dan memilih urutan sumbu dari bentuk gambar, sehingga bobot float dapat berbeda satu level pada beberapa piksel. Hal itu tidak mengubah hasil pada pemeriksaan kami.

Square input only. Export rejects a non-square imgsz, and height and width are 640 by default.

Detect and segment: batch size 1 only. The graph declares a dynamic batch axis, but batches of 2 or more fail in 1.7.0. Pose runs with any batch size.

For a bit-exact match, use Pillow's integer math: multiply each weight by 2^22 and round half away from zero, sum weight x pixel in integers, add 2^21, shift right by 22 and clip to 0 to 255.

Divide by 255 after the resize, then subtract the ImageNet mean and divide by the ImageNet std per channel.

Detection, ekspor default
OutputBentukArti
pred_logits[batch, queries, nc]Raw class logits per query, sigmoid not applied. 300 queries and 80 classes for the COCO checkpoints.
pred_boxes[batch, queries, 4]Boxes as cx, cy, w, h, normalized 0 to 1 of the input.

Pascapemrosesan

  1. Apply sigmoid to pred_logits.
  2. Flatten the scores to queries x nc and take the top max_det (300 by default) over all queries x classes. For flat index k, the query is k // nc and the class is k % nc. One query can yield several classes.
  3. Keep the entries whose score is strictly above the confidence threshold (0.25 by default). There is no NMS.
  4. Convert the query's box to x1, y1, x2, y2 with x1 = cx - w / 2, y1 = cy - h / 2, x2 = cx + w / 2, y2 = cy + h / 2.
  5. Map boxes back to the original image: multiply x by the original width and y by the original height. The input was stretched, so no pad offset applies. LibreYOLO does not clip these boxes to the image.
  6. nms=True is not available for this family: export raises NotImplementedError.
Instance segmentation, ekspor default
OutputBentukArti
pred_logits[batch, queries, nc]Raw class logits per query, sigmoid not applied. 300 queries and 80 classes for the COCO checkpoints.
pred_boxes[batch, queries, 4]Boxes as cx, cy, w, h, normalized 0 to 1 of the input.
pred_masks[batch, queries, mask_h, mask_w]Raw mask logits per query over the whole input canvas, sigmoid not applied. mask_h and mask_w are a quarter of the input, 160 x 160 at 640 x 640.

Pascapemrosesan

  1. Select detections exactly as for detect: sigmoid on pred_logits, top max_det (300 by default) over all queries x classes, keep scores strictly above the confidence threshold (0.25 by default). There is no NMS.
  2. Convert and map the boxes as for detect: cx, cy, w, h to x1, y1, x2, y2, then multiply x by the original width and y by the original height. LibreYOLO does not clip these boxes to the image.
  3. For each kept detection, take the mask logits of its query and resize them straight to the original image size with bilinear interpolation, half-pixel centers (align_corners=False) and no antialiasing. cv2.resize with INTER_LINEAR on float32 does this.
  4. The mask is the pixels whose resized logit is above 0. Masks are not cropped to the box.
  5. nms=True is not available for this family: export raises NotImplementedError.
Pose, ekspor default
OutputBentukArti
pred_logits[batch, queries, 2]Raw logits per query, sigmoid not applied. 60 queries. Index 1, the last one, is the person class. Index 0 is an unused slot.
pred_keypoints[batch, queries, num_keypoints * 2]Keypoints as x0, y0, x1, y1 and so on, normalized 0 to 1 of the input. num_keypoints is 17 (COCO order) and is recorded in the num_keypoints metadata key. There is no box output and no keypoint visibility or confidence.

Pascapemrosesan

  1. Apply sigmoid to the last logit of each query. That is the person score.
  2. Sort the queries by score, highest first, and keep at most max_det (300 by default, so all 60 queries). Keep the queries whose score is at or above the confidence threshold (0.25 by default). Note at or above here, strictly above for detect and segment. There is no NMS.
  3. Reshape each kept query's keypoints to [num_keypoints, 2]. Map them back to the original image: multiply x by the original width and y by the original height.
  4. The box is the extent of the mapped keypoints: x1, y1 are the minimum x and y, x2, y2 the maximum. The class is always 0 (person).
  5. LibreYOLO reports visibility 1 for every keypoint, since the graph predicts xy only.
  6. nms=True is not available for this family: export raises NotImplementedError.

Untuk memeriksa implementasi Anda sendiri, jalankan file yang sama lewat LibreYOLO: LibreYOLO("model.onnx").predict("image.jpg") mengembalikan hasil acuan. Diverifikasi dengan LibreYOLO 1.7.0.

Checkpoint

Semua berkas bobot yang dipublikasikan untuk family ini.

Setiap berkas di atas saat ini tersedia di organisasi LibreYOLO dan diunduh saat pertama kali digunakan.

Varian obj2coco mencakup deteksi, segmentasi, dan pose. Pengunduhannya memerlukan persetujuan eksplisit dan ketentuan upstream membatasi penggunaan komersial. Checkpoint COCO asli mempertahankan izin Apache-2.0 yang tercatat.

Lisensi

Periksa lisensi di repositori Hugging Face untuk bobot tertentu yang diunduh. Setiap checkpoint di organisasi LibreYOLO memiliki lisensi, dan lisensinya tidak selalu sama dalam satu family. Repositori tersebut adalah sumber resmi. Ringkasan di bawah menjelaskan ketentuan yang berlaku saat halaman ini terakhir diverifikasi.

Ini adalah deskripsi lisensi yang terlibat, bukan nasihat hukum. Jika jawabannya penting secara komersial, baca sendiri lisensinya dan mintalah nasihat dari penasihat hukum Anda.

Karya asli
EdgeCrafter, Intellindust AI Lab
Lisensi upstream
Apache-2.0 original COCO weights; restricted obj2coco weights
Kode LibreYOLO
MIT
Bobot
Apache-2.0 original COCO weights; restricted obj2coco weights, dipublikasikan ulang di huggingface.co/LibreYOLO
Interpretasi
Original COCO checkpoints retain their recorded Apache-2.0 grant. The obj2coco detection, segmentation and pose variants require explicit opt-in and retain non-commercial upstream terms. The library code license does not replace those weight terms.

Sitasi

@article{liu2026edgecrafter,
  title={EdgeCrafter: Compact ViTs for Edge Dense Prediction via Task-Specialized Distillation},
  author={Liu, Longfei and Hou, Yongjie and Li, Yang and Wang, Qirui and Sha, Youyang and Yu, Yongjun and Wang, Yinzhi and Ru, Peizhe and Yu, Xuanlong and Shen, Xi},
  journal={arXiv},
  year={2026}
}

Disalin dari blok sitasi penulis di github.com/Intellindust-AI-Lab/EdgeCrafter#-citation.

Diverifikasi dengan LibreYOLO v1.6.0. Tabel dukungan, checkpoint, dan angka benchmark di halaman ini dihasilkan dari library yang telah dirilis dan bobot yang dipublikasikan, bukan ditulis manual.