Run this model with HF Jobs
Run Softy-lines/Captcha-Digit-Detector on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Softy-lines/Captcha-Digit-Detector. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Softy-lines/Captcha-Digit-Detector on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Softy-lines/Captcha-Digit-Detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Adapters
How to use Softy-lines/Captcha-Digit-Detector with Adapters:
from adapters import AutoAdapterModel model = AutoAdapterModel.from_pretrained("<base-model-id>") model.load_adapter("Softy-lines/Captcha-Digit-Detector", set_active=True) - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files1231234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768---
license: apache-2.0
---# Model Card for Pixelated Captcha Digit Detection
## Model Details
- **License:** Apache-2.0- **Developed by:** Saidi Souhaieb- **Finetuned from model:** YOLOv8
## Uses
This model is designed to detect pixelated captcha digits by showing bounding boxes and extracting the coordinates of the detections.
## How to Get Started with the Model
```pythonfrom PIL import Image, ImageDrawfrom YOLO import YOLO # Assuming YOLO is a class in a module named YOLO
# Load the modelmodel = YOLO("models/number_finder.pt")
# Get model resultsmodel_results = model(image_path) img = Image.open(image_path)draw = ImageDraw.Draw(img)
# Sort results based on the x-coordinatedetected_objects = []captcha_result = ""boxes_data = []
for result in model_results: for box in result.boxes: box_data = {"xyxy": box.xyxy[0].tolist(), "label": str(box.cls.item())} boxes_data.append(box_data)
sorted_boxes_data = sorted(boxes_data, key=lambda x: x['xyxy'][0])
# Remove similar boxesunique_sorted_boxes_data = [sorted_boxes_data[0]]for i in range(1, len(sorted_boxes_data)): current_box = sorted_boxes_data[i] prev_box = unique_sorted_boxes_data[-1] # Check if the current box's x-coordinate is significantly different from the previous box if abs(current_box['xyxy'][0] - prev_box['xyxy'][0]) > 1: # Adjust threshold as needed unique_sorted_boxes_data.append(current_box)
for box in unique_sorted_boxes_data: label_name = box["label"] box_coords = box["xyxy"] detected_objects.append((box_coords)) draw.rectangle(box_coords, outline="red") draw.text((box_coords[0], box_coords[1] - 10), label_name, fill="red") captcha_result += str(int(label_name[0]) - 2)img.show() # Display the image with bounding boxes and labels```
## Training Details
### Training Data
Raw Pixel Digit Captcha Data []
## Model Card Authors [optional]
[Saidi Souhaieb]
README.md+68-3