MolDetv2 (YOLO26 Version)

This repository provides the YOLO26-based version of MolDetv2 model.

πŸ’» Usage

Detect molecules in an image:

from ultralytics import YOLO
model = YOLO("/path/to/moldet_v2_yolo26n_640_general.pt")  # for cpu only inference: using `moldet_v2_yolo26n_640_general.onnx` for faster speed
model.predict("path/to/image.png", save=True, imgsz=640, conf=0.5)

Detect molecules in a PDF document:

from ultralytics import YOLO
import fitz # MuPDF
pdf = fitz.open("doc.pdf")
model = YOLO("/path/to/moldet_v2_yolo26n_960_doc.pt")  # for cpu only inference: using `moldet_v2_yolo26n_960_doc.onnx` for faster speed
bboxes = []
for i, p in enumerate(pdf):
    img = f"page_{i}.png"; p.get_pixmap().save(img)
    for r in model.predict(img, imgsz=960, conf=0.5):
        for box in r.boxes:
            bboxes.append({"page":img, "conf":float(box.conf), "bbox":box.xyxy[0].tolist()})

πŸ“œ License

MolDet & MolDetv2 model weights are provided for non-commercial use only.

For commercial use, please contact: fangxi@dp.tech or add a discussion in HuggingFace.

πŸ“– Citation

If you use this model in your work, please cite:

Comming soon!
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for UniParser/MolDetv2-YOLO26

Quantized
(13)
this model

Collection including UniParser/MolDetv2-YOLO26