---
title: OpenSubject
canonical_url: "https://www.modelscope.cn/datasets/AI-ModelScope/OpenSubject"
md_url: "https://www.modelscope.cn/datasets/AI-ModelScope/OpenSubject.md"
repository: AI-ModelScope/OpenSubject
last_updated: 2025-12-14
license: apache-2.0
storage_size: "3.8 TB"
downloads: 104
stars: 1
---

# OpenSubject

> OpenSubject - AI-ModelScope 在 ModelScope 开源的数据集。OpenSubject is a video-derived large-scale corpus with 2.5M samples and 4.35M images for subject-driven generation and manipulation, as presented in the paper OpenSubject: Leveraging Video-Derived Identity and…

AI-ModelScope/OpenSubject 是 ModelScope 魔搭社区上的数据集，存储大小 3.8 TB，采用 apache-2.0 许可。

- **Repository**: AI-ModelScope/OpenSubject
- **License**: apache-2.0
- **Storage size**: 3.8 TB
- **Downloads**: 104
- **Stars**: 1
- **Last updated**: 2025-12-14

Source: https://www.modelscope.cn/datasets/AI-ModelScope/OpenSubject

---

# OpenSubject Dataset

OpenSubject is a video-derived large-scale corpus with 2.5M samples and 4.35M images for subject-driven generation and manipulation, as presented in the paper [OpenSubject: Leveraging Video-Derived Identity and Diversity Priors for Subject-driven Image Generation and Manipulation](https://huggingface.co/papers/2512.08294).

## Project Page & Code
See the main repository for more details and code: [OpenSubject](https://github.com/LAW1223/OpenSubject)

## Dataset Structure

```
OpenSubject/
├── Images_packages/          # Compressed image packages (tar.gz)
│   ├── generation_input_images_*.tar.gz
│   ├── generation_output_images_*.tar.gz
│   ├── manipulation_input_images_*.tar.gz
│   └── manipulation_output_images_*.tar.gz
└── Jsonls/                   # Annotation files
    ├── generation_merged.jsonl
    └── manipulation_merged.jsonl
```

## Extracting Images

After downloading, extract the image packages:

```bash
python scripts/unzip_images/extract_images.py \
    --packages_dir ./Images_packages \
    --output_dir ./Images \
    --num_workers 32
```

This will create the following structure:

```
Images/
├── generation/
│   ├── input_images/
│   └── output_images/
└── manipulation/
    ├── input_images/
    └── output_images/
```

## Sample Usage

The CLI tool (`scripts/inference_cli.py` in the main repository) allows you to generate images directly from the command line.

### Basic Usage (Text-to-Image)

Generate an image from a text prompt:

```bash
python scripts/inference_cli.py \
    --model_path /path/to/omnigen2_model \
    --transformer_path /path/to/opensubject_model \
    --prompt "a beautiful landscape with mountains and lakes" \
    --output_path output.png \
    --num_inference_step 50 \
    --height 1024 \
    --width 1024
```

### With Input Images (Image-to-Image)

Generate an image with reference input images:

```bash
python scripts/inference_cli.py \
    --model_path /path/to/omnigen2_model \
    --transformer_path /path/to/opensubject_model \
    --prompt "transform the scene to sunset" \
    --input_images input1.jpg input2.jpg \
    --output_path result.png \
    --num_inference_step 50
```

## License

This dataset is released under the Apache 2.0 License.
