Downloads · 30 days
22
21% of all-time downloads
Malrak/best-comic-panel-detection
best-comic-panel-detection is a object detection model from Malrak. Use it when you need objects located in an image. It is set up for ultralytics. The card lists the license as apache-2.0.
This repository contains a YOLOv12x object detection model fine-tuned to detect individual panels in comic book pages. The model identifies the bounding boxes for each panel, making it a valuable tool for digitizing c…
Downloads · 30 days
22
21% of all-time downloads
All-time downloads
103
Public
Repo size
301 MB
Likes
0
Public
Click a slice to open those files.
.pt238 MB · 79%
From the Hugging Face model README
This repository contains a YOLOv12x object detection model fine-tuned to detect individual panels in comic book pages. The model identifies the bounding boxes for each panel, making it a valuable tool for digitizing comics, extracting content, or building datasets for downstream analysis.
This model was trained in PyTorch using the powerful ultralytics library and demonstrates high performance on a custom-annotated dataset of comic pages.
Visit this space to try out the model right now: The_Best_Comic_Panel_Detection.
YOLOv12x (the extra-large variant)Comic PanelYou can easily use this model with the ultralytics library. The model file best.pt from this repository is required.
# 1. Install Ultralytics
!pip install ultralytics
from ultralytics import YOLO
from PIL import Image
# 2. Load the fine-tuned model
# Make sure 'best.pt' is in your current directory
model = YOLO('best.pt')
# 3. Run inference on an image
image_path = 'path/to/your/comic_page.jpg'
results = model.predict(source=image_path)
# 4. Process and visualize results
# The 'results' object contains bounding boxes, classes, and confidence scores
for result in results:
# Plotting will draw the bounding boxes on the image
im_array = result.plot()
im = Image.fromarray(im_array[..., ::-1]) # Convert BGR to RGB
im.show() # Display the image
# or
# im.save('prediction_result.jpg')
# You can also access bounding box data directly
for box in results[0].boxes:
print("Class:", model.names[int(box.cls)])
print("Confidence:", box.conf.item())
print("Coordinates (xyxy):", box.xyxy[0].tolist())
print("-" * 20)
The model was fine-tuned using transfer learning from a YOLOv12x checkpoint pre-trained on the COCO dataset.

The model's performance was evaluated on the validation set during training. The final metrics are based on the checkpoint that achieved the highest mAP50-95.
| Metric | Value | Description |
|---|---|---|
| mAP50 | 0.991 | Mean Average Precision at IoU threshold 0.50. |
| mAP50-95 | 0.985 | Mean Average Precision averaged over IoU thresholds from 0.50 to 0.95. |
The model achieves near-perfect precision and recall on the validation data, indicating a strong ability to correctly identify comic panels within the styles present in the dataset.

The model correctly identifies panels of various sizes and layouts in the validation set.

This model is intended for applications requiring the segmentation of comic book pages into their constituent panels. This can be a pre-processing step for:
The model has been tested in real world applications and has shown promising results.
This model card is based on the training notebook YOLOV12-Comic-Panel-Detection.