OmniStyle-150k
收藏魔搭社区2025-12-26 更新2025-08-02 收录
下载链接:
https://modelscope.cn/datasets/StyleXX/OmniStyle-150k
下载链接
链接失效反馈官方服务:
资源简介:
# OmniStyle-150K Dataset
**OmniStyle-150K** is a high-quality triplet dataset specifically designed to support **generalizable**, **controllable**, and **high-resolution** image style transfer. Each triplet includes a content image, a style reference image, and the corresponding stylized result.
---
## 📦 Dataset Structure
- `OmniStyle-150K/`: Stylized result images
- `content/`: Original content images
- `style/`: Style reference images
Each file in the `OmniStyle-150K/` folder is named using the pattern:
`<content_image_name>&&<style_image_name>.jpg`
---
## 🚀 How to Use
### Step 1: Merge Split Archives
If you downloaded the dataset in multiple parts (e.g., `OmniStyle-150K.tar.part_aa`, `part_ab`, `part_ac`, ...), you need to merge them into a single `.tar` file before extracting.
Run the following command in your terminal:
```bash
cat OmniStyle-150K.tar.part_* > OmniStyle-150K.tar
```
This will generate the complete OmniStyle-150K.tar archive. Then extract it using:
```bash
tar -xf OmniStyle-150K.tar
tar -xf content.tar
tar -xf style.tar
```
After extraction, your directory structure should look like this:
```css
OmniStyle-150K/
content/
style/
```
---
### Step 2: Load Triplets for Training or Evaluation
You can use the following Python code to iterate through the stylized results and load the corresponding triplets (content, style, and stylized image paths):
```python
import os
from tqdm import tqdm
stylized_folder = "OmniStyle-150K"
content_folder = "content"
style_folder = "style"
for img in tqdm(sorted(os.listdir(stylized_folder))):
# Parse filenames
cnt_name, style_name = img.split("&&")
style_name = style_name[:-4] # remove file extension
# Construct full paths
cnt_path = os.path.join(content_folder, cnt_name)
style_path = os.path.join(style_folder, style_name)
stylized_path = os.path.join(stylized_folder, img)
# Here is the code for your customized processing workflow
# For example:
# - Load and preprocess images
# - Train a model on triplets
# - Save triplet paths, etc.
# OmniStyle-150K 数据集
**OmniStyle-150K** 是一款专为支持**可泛化、可控制、高分辨率**图像风格迁移而设计的高质量三元组数据集。每个三元组包含一张内容图像、一张风格参考图像,以及对应的风格化结果图像。
---
## 📦 数据集结构
- `OmniStyle-150K/`:存储风格化结果图像的文件夹
- `content/`:存储原始内容图像的文件夹
- `style/`:存储风格参考图像的文件夹
`OmniStyle-150K/` 文件夹内的所有文件均遵循如下命名格式:
`<content_image_name>&&<style_image_name>.jpg`
---
## 🚀 使用方法
### 步骤1:合并分卷归档文件
若您以分卷形式下载了该数据集(例如 `OmniStyle-150K.tar.part_aa`、`part_ab`、`part_ac` 等),需先将其合并为单个 `.tar` 归档文件后方可解压。
请在终端执行如下命令:
bash
cat OmniStyle-150K.tar.part_* > OmniStyle-150K.tar
该命令将生成完整的 `OmniStyle-150K.tar` 归档文件。随后通过以下命令完成解压:
bash
tar -xf OmniStyle-150K.tar
tar -xf content.tar
tar -xf style.tar
解压完成后,目录结构应如下所示:
css
OmniStyle-150K/
content/
style/
---
### 步骤2:加载三元组以用于训练或评估
您可通过如下Python代码遍历风格化结果图像,并加载对应的三元组(内容图像、风格图像及风格化图像的路径):
python
import os
from tqdm import tqdm
stylized_folder = "OmniStyle-150K"
content_folder = "content"
style_folder = "style"
for img in tqdm(sorted(os.listdir(stylized_folder))):
# 解析文件名
cnt_name, style_name = img.split("&&")
style_name = style_name[:-4] # 移除文件扩展名
# 构造完整路径
cnt_path = os.path.join(content_folder, cnt_name)
style_path = os.path.join(style_folder, style_name)
stylized_path = os.path.join(stylized_folder, img)
# 此处为您的自定义处理工作流代码
# 示例:
# - 加载并预处理图像
# - 在三元组上训练模型
# - 保存三元组路径等。
提供机构:
maas
创建时间:
2025-08-01



