Skip to content

Commit a81e622

Browse files
committed
object detection model fast r-cnn, trained on COCO dataset to identity 80 different objects
1 parent 2c71652 commit a81e622

File tree

2 files changed

+608
-0
lines changed

2 files changed

+608
-0
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# 🪐 Saturn Cloud Template: Object Detection with Faster R-CNN
2+
3+
This template provides a ready-to-run **object detection project** built for **Saturn Cloud**.
4+
It uses a pre-trained **Faster R-CNN** model to detect common objects in images and visualize results — all powered by **GPU acceleration**.
5+
6+
Use this template as a **fast start** for your own computer vision or image analysis projects on Saturn Cloud.
7+
8+
---
9+
10+
## 🧠 What This Template Does
11+
12+
- Load and analyze images from **local paths** or **URLs**
13+
- Detect objects using a pre-trained **Faster R-CNN** model
14+
- Display bounding boxes and confidence scores
15+
- Run interactively from a terminal or Jupyter Notebook
16+
- Easily extend to **custom training, datasets, or scaling** with Saturn Cloud’s GPU clusters
17+
18+
---
19+
20+
## ⚙️ Saturn Cloud Environment Setup
21+
22+
This template is pre-configured for **Saturn Cloud GPU environments**.
23+
You can run it immediately on a GPU-backed resource — no setup required beyond installing dependencies.
24+
25+
### Default Environment
26+
- **Image**: `saturncloud/pytorch:latest`
27+
- **Hardware**: GPU instance (recommended: 1× NVIDIA T4 or A10G)
28+
- **Python**: 3.10+
29+
- **Memory**: 8GB+
30+
31+
### Dependencies (from `requirements.txt`)
32+
```
33+
34+
torch
35+
torchvision
36+
matplotlib
37+
pillow
38+
requests
39+
40+
````
41+
42+
To reproduce the environment manually:
43+
44+
```bash
45+
pip install -r requirements.txt
46+
````
47+
48+
---
49+
50+
## 🚀 Quickstart (in Saturn Cloud)
51+
52+
1. **Launch this template** in your Saturn Cloud workspace:
53+
54+
* Go to [Saturn Cloud](https://saturncloud.io/)
55+
* Click **New Project → From Template**
56+
* Choose **Object Detection with Faster R-CNN**
57+
58+
2. **Open the Jupyter notebook and run all the code cells**.
59+
60+
3. When prompted, enter an image path or URL.
61+
You can test with this example URL:
62+
63+
```
64+
https://plus.unsplash.com/premium_photo-1667030489905-d8e6309ebe0e?ixlib=rb-4.1.0&auto=format&fit=crop&q=60&w=200
65+
```
66+
67+
Output:
68+
69+
```
70+
📡 Downloading image from URL...
71+
✅ Image downloaded successfully
72+
🎯 Detected 3 objects (threshold: 0.5):
73+
1. Person: 99.3%
74+
2. Dog: 97.1%
75+
3. Chair: 88.4%
76+
```
77+
78+
4. A visualization window will display the bounding boxes drawn over the detected objects.
79+
80+
---
81+
82+
## 🧩 Core Components
83+
84+
### `detect_in_uploaded_image(image_input, threshold=0.5)`
85+
86+
Detects objects in an image (from a local file or URL) using the pre-trained model.
87+
Returns the bounding boxes, labels, and confidence scores.
88+
89+
---
90+
91+
## 📚 References
92+
93+
* [Saturn Cloud Examples Repository](https://github.com/saturncloud/examples)
94+
* [Faster R-CNN Model Implementation](https://github.com/trzy/FasterRCNN)
95+
* [COCO Dataset Classes](https://cocodataset.org/#home)
96+
* [Saturn Cloud Documentation](https://saturncloud.io/docs/)
97+
98+

0 commit comments

Comments
 (0)