Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Build fully-functioning computer vision models with PyTorch
| Date | Stars |
|---|---|
| 2026-07-24 | 628 |
| 2026-07-25 | 628 |
| 2026-07-28 | 627 |
| 2026-07-30 | 627 |
| 2026-07-31 | 627 |
| 2026-08-06 | 627 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day

--------------------------------------
[](https://detecto.readthedocs.io/en/latest/?badge=latest)
[](https://pepy.tech/project/detecto)
Detecto is a Python package that allows you to build fully-functioning computer vision and object detection models with just 5 lines of code.
Inference on still images and videos, transfer learning on custom datasets, and serialization of models to files are just a few of Detecto's features.
Detecto is also built on top of PyTorch, allowing an easy transfer of models between the two libraries.
The table below shows a few examples of Detecto's performance:
Still Image | Video
:----------------------------------------------------------------------------:|:-----------------------------------------:
<img src="./assets/apple_orange.png" alt="Detecto still image" width="500px"> | 
# Installation
To install Detecto using pip, run the following command:
`pip3 install detecto`
Installing with pip should download all of Detecto's dependencies automatically.
However, if an issue arises, you can manually download the dependencies listed in the [requirements.txt](requirements.txt) file.
# Usage
The power of Detecto comes from its simplicity and ease of use. Creating and running a pre-trained
[Faster R-CNN ResNet-50 FPN](https://pytorch.org/docs/stable/torchvision/models.html#object-detection-instance-segmentation-and-person-keypoint-detection)
from PyTorch's model zoo takes 4 lines of code:
```python
from detecto.core import Model
from detecto.visualize import detect_video
model = Model() # Initialize a pre-trained model
detect_video(model, 'input_video.mp4', 'output.avi') # Run inference on a video
```
Below are several more examples of things you can do with Detecto:
### Transfer Learning on Custom Datasets
Most of the times, you want a computer vision model that can detect custom objects. With Detecto, you can train a model on a custom dataset with 5 lines of code:
```python
from detecto.core import Model, Dataset
dataset = Dataset('custom_dataset/') # Load images and label data from the custom_dataset/ folder
model = Model(['dog', 'cat', 'rabbit']) # Train to predict dogs, cats, and rabbits
model.fit(dataset)
model.predict(...) # Start using your trained model!
```
### Inference and Visualization
When using a model for inference, Detecto returns predictions in an easy-to-use format and provides several visualization tools:
```python
from detecto.core import Model
from detecto import utils, visualize
model = Model()
image = utils.read_image('image.jpg') # Helper function to read in images
labels, boxes, scores = model.predict(image) # Get all predictions on an image
predictions = model.predict_top(image) # Same as above, but returns only the top predictions
print(labels, boxes, scores)
print(predictions)
visualize.show_labeled_image(image, boxes, labels) # Plot predictions on a single image
images = [...]
visualize.plot_prediction_grid(model, images) # Plot predictions on a list of images
visualize.detect_video(model, 'input_video.mp4', 'output.avi') # Run inference on a video
visualize.detect_live(model) # Run inference on a live webcam
```
### Advanced Usage
If you want more control over how you train your model, Detecto lets you do just that:
```python
from detecto import core, utils
from torchvision import transforms
import matplotlib.pyplot as plt
# Convert XML files to CSV format
utils.xml_to_csv('training_labels/', 'train_labels.csv')
utils.xml_to_csv('validation_labels/', 'val_labels.csv')
# Define custom transforms to apply to your dataset
custom_transforms = transforms.Compose([
transforms.ToPILImage(),
transforms.Resize(800),
transforms.ColorJitteExcerpt of 7,311 characters
Read on GitHub127
3
Tasin Ishmam · @smartlyio · Germany
3
1
1
1
1
1
1
1
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:3b9f04f35cdb5c2b, topic:computer-vision, topic:object-detection, desc:computer vision