stage 1 working
This commit is contained in:
60
README.md
60
README.md
@@ -32,19 +32,40 @@ git clone <repository-url>
|
||||
cd samyolo_on_segments
|
||||
|
||||
# Install Python dependencies
|
||||
pip install -r requirements.txt
|
||||
uv venv && source .venv/bin/activate
|
||||
uv pip install -r requirements.txt
|
||||
```
|
||||
|
||||
### Model Dependencies
|
||||
### Download Models
|
||||
|
||||
You'll need to download the required model checkpoints:
|
||||
Use the provided script to automatically download all required models:
|
||||
|
||||
```bash
|
||||
# Download SAM2.1 and YOLO models
|
||||
python download_models.py
|
||||
```
|
||||
|
||||
This script will:
|
||||
- Create a `models/` directory structure
|
||||
- Download SAM2.1 configs and checkpoints (tiny, small, base+, large)
|
||||
- Download common YOLO models (yolov8n, yolov8s, yolov8m)
|
||||
- Update `config.yaml` to use local model paths
|
||||
|
||||
**Manual Download (Alternative):**
|
||||
1. **SAM2 Models**: Download from [Meta's SAM2 repository](https://github.com/facebookresearch/sam2)
|
||||
2. **YOLO Models**: YOLOv8 models will be downloaded automatically or you can specify a custom path
|
||||
2. **YOLO Models**: YOLOv8 models will be downloaded automatically on first use
|
||||
|
||||
## Quick Start
|
||||
|
||||
### 1. Configure the Pipeline
|
||||
### 1. Download Models
|
||||
|
||||
First, download the required SAM2.1 and YOLO models:
|
||||
|
||||
```bash
|
||||
python download_models.py
|
||||
```
|
||||
|
||||
### 2. Configure the Pipeline
|
||||
|
||||
Edit `config.yaml` to specify your input video and desired settings:
|
||||
|
||||
@@ -63,18 +84,18 @@ processing:
|
||||
detect_segments: "all"
|
||||
|
||||
models:
|
||||
yolo_model: "yolov8n.pt"
|
||||
sam2_checkpoint: "../checkpoints/sam2.1_hiera_large.pt"
|
||||
sam2_config: "configs/sam2.1/sam2.1_hiera_l.yaml"
|
||||
yolo_model: "models/yolo/yolov8n.pt"
|
||||
sam2_checkpoint: "models/sam2/checkpoints/sam2.1_hiera_large.pt"
|
||||
sam2_config: "models/sam2/configs/sam2.1/sam2.1_hiera_l.yaml"
|
||||
```
|
||||
|
||||
### 2. Run the Pipeline
|
||||
### 3. Run the Pipeline
|
||||
|
||||
```bash
|
||||
python main.py --config config.yaml
|
||||
```
|
||||
|
||||
### 3. Monitor Progress
|
||||
### 4. Monitor Progress
|
||||
|
||||
Check processing status:
|
||||
```bash
|
||||
@@ -166,8 +187,25 @@ samyolo_on_segments/
|
||||
├── README.md # This documentation
|
||||
├── config.yaml # Default configuration
|
||||
├── main.py # Main entry point
|
||||
├── download_models.py # Model download script
|
||||
├── requirements.txt # Python dependencies
|
||||
├── spec.md # Detailed specification
|
||||
├── models/ # Downloaded models (created by script)
|
||||
│ ├── sam2/
|
||||
│ │ ├── configs/sam2.1/ # SAM2.1 configuration files
|
||||
│ │ │ ├── sam2.1_hiera_t.yaml
|
||||
│ │ │ ├── sam2.1_hiera_s.yaml
|
||||
│ │ │ ├── sam2.1_hiera_b+.yaml
|
||||
│ │ │ └── sam2.1_hiera_l.yaml
|
||||
│ │ └── checkpoints/ # SAM2.1 model weights
|
||||
│ │ ├── sam2.1_hiera_tiny.pt
|
||||
│ │ ├── sam2.1_hiera_small.pt
|
||||
│ │ ├── sam2.1_hiera_base_plus.pt
|
||||
│ │ └── sam2.1_hiera_large.pt
|
||||
│ └── yolo/ # YOLO model weights
|
||||
│ ├── yolov8n.pt
|
||||
│ ├── yolov8s.pt
|
||||
│ └── yolov8m.pt
|
||||
├── core/ # Core processing modules
|
||||
│ ├── __init__.py
|
||||
│ ├── config_loader.py # Configuration management
|
||||
@@ -297,4 +335,4 @@ This project is under active development. The core detection pipeline is functio
|
||||
For issues and questions:
|
||||
1. Check the troubleshooting section
|
||||
2. Review the logs with `log_level: "DEBUG"`
|
||||
3. Open an issue with your configuration and error details
|
||||
3. Open an issue with your configuration and error details
|
||||
|
||||
Reference in New Issue
Block a user