DexiNed

DexiNed (Dense Extreme Inception Network) là mạng tích chập dự đoán map xác suất cạnh dense từ một ảnh RGB. LibreYOLO bọc kiến trúc này chỉ cho phát hiện cạnh; không có checkpoint nào đi kèm thư viện.

Tác vụ
edge
Kích thước
b at 352 px
Cài đặt
pip install libreyolo
Bậc hỗ trợ
Chỉ suy luận, từ v. Chỉ dự đoán, kiểm định và xuất. Không áp dụng các tính năng huấn luyện.
Thượng nguồn
DexiNed của Xavier Soria, MIT. Bài báo, mã nguồn
Giấy phép
Mã nguồn MIT, trọng số MIT. Sử dụng thương mại

Cài đặt

DexiNed không cần extra tùy chọn. Mọi thành phần mà mô hình import đều có trong bản cài đặt cơ sở.

bash
pip install libreyolo

Dự đoán

LibreYOLO không cung cấp checkpoint DexiNed. Trọng số được phát hành chính thức được huấn luyện trên BIPED, có điều khoản dataset đã công bố giới hạn việc sử dụng vào mục đích phi thương mại, vì vậy LibreYOLO không mirror chúng. Hãy chuyển đổi checkpoint mà bạn được cấp phép sử dụng bằng weights/convert_dexined_weights.py; script này kiểm tra các key tensor theo kiến trúc runtime trước khi ghi tệp mà LibreYOLO có thể tải trực tiếp:

bash
python weights/convert_dexined_weights.py upstream.pth weights/LibreDexiNedb-edge.pt --verify

Python
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("weights/LibreDexiNedb-edge.pt")result = model(SAMPLE_IMAGE, save=True) edges = result.edgesprint(edges.array.shape)        # (H, W) float32 trong [0, 1]print(edges.binary(0.5).sum())  # số pixel cạnh sau khi áp ngưỡng
CLI
libreyolo predict model=weights/LibreDexiNedb-edge.pt source=https://raw.githubusercontent.com/LibreYOLO/libreyolo/release/libreyolo/assets/parkour.jpg save=True

result.edges chứa kết quả: một mảng float32 (H, W) trong [0, 1], với .binary(threshold) trả về mặt nạ cạnh kiểu boolean. Không có box, vì vậy conf, ioumax_det không có tác dụng. Xem dự đoán để biết về nguồn, xử lý luồng và kết quả.

Biến thể

DexiNed cung cấp một kích thước trong LibreYOLO. Bộ công cụ benchmark của LibreYOLO chưa đo họ mô hình này, vì vậy không có số liệu đã công bố để so sánh.

Xác thực

val() báo cáo F-measure ODS và OIS kiểu BSDS trên dataset cạnh theo cặp: ảnh đặt cạnh các edge map có cùng phần tên gốc, cùng mặt nạ hợp lệ tùy chọn để các pixel padding không bao giờ được tính. imgsz phải chia hết cho downsample stride của mạng, LibreYOLO sẽ phát sinh lỗi rõ ràng nếu không đạt.

Python
from libreyolo import LibreYOLO model = LibreYOLO("weights/LibreDexiNedb-edge.pt")metrics = model.val(data="my-dataset.yaml", imgsz=352) print(metrics["metrics/ODS"])   # F-measure ở tỷ lệ dataset tối ưuprint(metrics["metrics/OIS"])   # F-measure ở tỷ lệ ảnh tối ưu
CLI
libreyolo val model=weights/LibreDexiNedb-edge.pt data=my-dataset.yaml imgsz=352

Xuất

Tác vụONNXTorchScriptExecuTorchTensorRTOpenVINOPaddleMNNRKNNncnnTFLiteCoreMLCore AI
edgeedge to ONNX: được hỗ trợedge to TorchScript: được hỗ trợedge to ExecuTorch: được hỗ trợedge to TensorRT: được hỗ trợedge to OpenVINO: được hỗ trợedge to Paddle: không được hỗ trợedge to MNN: không được hỗ trợedge to RKNN: không được hỗ trợedge to ncnn: không được hỗ trợedge to TFLite: được hỗ trợedge to CoreML: không được hỗ trợedge to Core AI: không được hỗ trợ

Việc xuất cạnh sử dụng hợp đồng runtime batch 1, độ phân giải cố định: dynamicbatch khác 1 bị từ chối, graph đã xuất cho đầu ra là một map xác suất hợp nhất duy nhất. Artifact đã xuất được tải lại qua LibreYOLO() dựa trên hậu tố tệp, vì vậy tệp .onnx hoạt động như checkpoint và trả về cùng đối tượng Results.

Python
from libreyolo import LibreYOLO model = LibreYOLO("weights/LibreDexiNedb-edge.pt")model.export(format="onnx", imgsz=352)model.export(format="tensorrt", imgsz=352, half=True)
CLI
libreyolo export model=weights/LibreDexiNedb-edge.pt format=onnx imgsz=352libreyolo export model=weights/LibreDexiNedb-edge.pt format=tensorrt imgsz=352 half=True
Dùng tệp đã xuất
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("weights/LibreDexiNedb-edge.onnx")result = model(SAMPLE_IMAGE) print(result.edges.array.shape)

Giấy phép

Hãy kiểm tra giấy phép trong repo Hugging Face của trọng số cụ thể mà bạn tải xuống. Mỗi checkpoint trong tổ chức LibreYOLO đều có giấy phép riêng và giấy phép có thể khác nhau trong cùng một họ. Repo đó là nguồn có thẩm quyền; phần tóm tắt dưới đây mô tả các điều khoản áp dụng khi trang này được kiểm chứng lần gần nhất.

Đây là phần mô tả các giấy phép liên quan, không phải tư vấn pháp lý. Nếu câu trả lời có ý nghĩa về mặt thương mại, hãy tự đọc các giấy phép và tham khảo cố vấn của riêng bạn.

Công trình gốc
DexiNed, Xavier Soria
Giấy phép thượng nguồn
MIT
Nguồn thượng nguồn
github.com/xavysp/DexiNed
Mã nguồn LibreYOLO
MIT
Trọng số
MIT, do tác giả phân phối. LibreYOLO không lưu trữ hoặc sao chép chúng.
Diễn giải
MIT is a permissive license, so the DexiNed architecture LibreYOLO ports can be used in commercial and closed-source products, with the license text and copyright notice kept alongside any copy you redistribute. LibreYOLO ships no checkpoint for this family: the officially released weights are trained on BIPED, whose published dataset terms restrict use to non-commercial purposes, and mirroring them would carry that restriction into a nominally MIT-licensed download. Convert a checkpoint you hold a license for with `weights/convert_dexined_weights.py`; the MIT code license does not change the terms attached to whatever checkpoint you convert.

LibreYOLO không phát hành checkpoint DexiNed. Không có nội dung nào được mirror trong tổ chức LibreYOLO; thay vào đó hãy chuyển đổi checkpoint mà bạn có giấy phép sử dụng bằng weights/convert_dexined_weights.py.

Trích dẫn

@INPROCEEDINGS {xsoria2020dexined,
author = {X. Soria and E. Riba and A. Sappa},
booktitle = {2020 IEEE Winter Conference on Applications of Computer Vision (WACV)},
title = {Dense Extreme Inception Network: Towards a Robust CNN Model for Edge Detection},
year = {2020},
volume = {},
issn = {},
pages = {1912-1921},
keywords = {image edge detection;convolution;training;feeds;machine learning;task analysis;kernel},
doi = {10.1109/WACV45572.2020.9093290},
url = {https://doi.ieeecomputersociety.org/10.1109/WACV45572.2020.9093290},
publisher = {IEEE Computer Society},
address = {Los Alamitos, CA, USA},
month = {mar}
}

@article{soria2023dexined_ext,
title = {Dense extreme inception network for edge detection},
journal = {Pattern Recognition},
volume = {139},
pages = {109461},
year = {2023},
issn = {0031-3203},
doi = {https://doi.org/10.1016/j.patcog.2023.109461},
url = {https://www.sciencedirect.com/science/article/pii/S0031320323001619},
author = {Xavier Soria and Angel Sappa and Patricio Humanante and Arash Akbarinia},
keywords = {Edge detection, Deep learning, CNN, Contour detection, Boundary detection, Segmentation}
}

Được sao chép từ khối trích dẫn của tác giả tại github.com/xavysp/DexiNed#citation.

Đã kiểm chứng với LibreYOLO v1.5.0. Các bảng hỗ trợ, checkpoint và số liệu benchmark trên trang này được tạo từ thư viện đã phát hành và trọng số đã công bố, không phải viết thủ công.