Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- VQA_model/README.md +62 -0
- VQA_model/README_correlation.md +88 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1000/000.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1000/001.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1000/002.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1000/003.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1000/004.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1000/005.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1000/006.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1000/007.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1008/000.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1008/001.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1008/002.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1008/003.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1008/004.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1008/005.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1008/006.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1008/007.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1014/000.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1014/001.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1014/002.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1014/003.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1014/004.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1014/005.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1014/006.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1014/007.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1044/000.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1044/001.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1044/002.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1044/003.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1044/004.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1044/005.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1044/006.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1044/007.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1046/000.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1046/001.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1046/002.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1046/003.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1046/004.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1046/005.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1046/006.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1046/007.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1051/000.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1051/001.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1051/002.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1051/003.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1051/004.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1051/005.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1051/006.png +3 -0
- VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1051/007.png +3 -0
VQA_model/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 视频质量评估 - PickScore
|
| 2 |
+
|
| 3 |
+
使用PickScore模型对视频质量进行评估,并计算与主观评分的相关性。
|
| 4 |
+
|
| 5 |
+
## 环境要求
|
| 6 |
+
|
| 7 |
+
- Python 3.7+
|
| 8 |
+
- PyTorch
|
| 9 |
+
- Transformers
|
| 10 |
+
- OpenCV
|
| 11 |
+
- Pandas
|
| 12 |
+
- Numpy
|
| 13 |
+
- PIL
|
| 14 |
+
|
| 15 |
+
## 安装依赖
|
| 16 |
+
|
| 17 |
+
```bash
|
| 18 |
+
pip install -r requirements.txt
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
## 使用方法
|
| 22 |
+
|
| 23 |
+
### 准备数据
|
| 24 |
+
|
| 25 |
+
准备一个包含视频路径、主观评分和提示词的文本文件,格式如下:
|
| 26 |
+
|
| 27 |
+
```
|
| 28 |
+
视频相对路径,主观评分,提示词描述
|
| 29 |
+
video_editing_score/video1.mp4,4.5,一段流畅的视频
|
| 30 |
+
multi_object/video2.mp4,3.2,多个物体的运动场景
|
| 31 |
+
...
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
### 运行评估
|
| 35 |
+
|
| 36 |
+
```bash
|
| 37 |
+
python batch_process.py --txt_path 输入文件路径 --output_path 结果保存路径 [--dataset_root 数据集根目录] [--num_frames 每个视频提取的帧数]
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
参数说明:
|
| 41 |
+
- `--txt_path`: 输入的文本文件路径(必填)
|
| 42 |
+
- `--output_path`: 结果保存的CSV文件路径(必填)
|
| 43 |
+
- `--dataset_root`: 数据集根目录,默认为 `/home/wangjuntong/VQA_model/dataset/`
|
| 44 |
+
- `--num_frames`: 每个视频提取的帧数,默认为8
|
| 45 |
+
|
| 46 |
+
### 输出结果
|
| 47 |
+
|
| 48 |
+
程序将生成两个文件:
|
| 49 |
+
1. CSV文件:包含每个视频的路径、主观评分、提示词和PickScore得分
|
| 50 |
+
2. 指标文件:包含SRCC、PLCC和KRCC相关性指标
|
| 51 |
+
|
| 52 |
+
## 示例
|
| 53 |
+
|
| 54 |
+
```bash
|
| 55 |
+
python batch_process.py --txt_path video_list.txt --output_path results.csv
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
## 注意事项
|
| 59 |
+
|
| 60 |
+
1. 确保视频文件可以正常打开和读取
|
| 61 |
+
2. 每个视频会提取8帧(可通过参数调整)计算平均得分
|
| 62 |
+
3. 如果视频数量少于2个,将无法计算相关性指标
|
VQA_model/README_correlation.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 相关系数计算工具
|
| 2 |
+
|
| 3 |
+
这个Python脚本用于计算两个视频质量评分文件之间的相关系数(SRCC、KRCC、PLCC)。
|
| 4 |
+
|
| 5 |
+
## 功能
|
| 6 |
+
|
| 7 |
+
- 从JSON/JSONL文件中提取`rel_path`和`clip_score`
|
| 8 |
+
- 从TXT文件中提取视频路径和质量分数
|
| 9 |
+
- 计算斯皮尔曼等级相关系数 (SRCC)
|
| 10 |
+
- 计算肯德尔等级相关系数 (KRCC)
|
| 11 |
+
- 计算皮尔逊线性相关系数 (PLCC)
|
| 12 |
+
- 验证两个文件中的路径匹配情况
|
| 13 |
+
|
| 14 |
+
## 依赖
|
| 15 |
+
|
| 16 |
+
- Python 3.6+
|
| 17 |
+
- NumPy
|
| 18 |
+
- SciPy
|
| 19 |
+
|
| 20 |
+
## 使用方法
|
| 21 |
+
|
| 22 |
+
```bash
|
| 23 |
+
python calculate_correlation.py --jsonl <jsonl文件路径> --txt <txt文件路径>
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
### 示例
|
| 27 |
+
|
| 28 |
+
```bash
|
| 29 |
+
python calculate_correlation.py --jsonl clipscore_results/clipscore_checkpoint.json --txt /home/wangjuntong/VQA_model/dataset/video_editing_score/video_quality.txt
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
## 输入文件格式
|
| 33 |
+
|
| 34 |
+
### JSONL/JSON 文件格式
|
| 35 |
+
|
| 36 |
+
预期的JSON文件格式如下:
|
| 37 |
+
|
| 38 |
+
```json
|
| 39 |
+
{
|
| 40 |
+
"results": [
|
| 41 |
+
{
|
| 42 |
+
"video_path": "/path/to/video.mp4",
|
| 43 |
+
"rel_path": "relative/path/to/video.mp4",
|
| 44 |
+
"clip_score": 36.375,
|
| 45 |
+
"...": "..."
|
| 46 |
+
},
|
| 47 |
+
...
|
| 48 |
+
]
|
| 49 |
+
}
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
或者:
|
| 53 |
+
|
| 54 |
+
```json
|
| 55 |
+
[
|
| 56 |
+
{
|
| 57 |
+
"video_path": "/path/to/video.mp4",
|
| 58 |
+
"rel_path": "relative/path/to/video.mp4",
|
| 59 |
+
"clip_score": 36.375,
|
| 60 |
+
"...": "..."
|
| 61 |
+
},
|
| 62 |
+
...
|
| 63 |
+
]
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
### TXT 文件格式
|
| 67 |
+
|
| 68 |
+
预期的TXT文件格式为每行一个记录,路径和分数由逗号分隔:
|
| 69 |
+
|
| 70 |
+
```
|
| 71 |
+
relative/path/to/video.mp4,42.67
|
| 72 |
+
another/path/to/video.mp4,56.0
|
| 73 |
+
...
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
## 输出
|
| 77 |
+
|
| 78 |
+
脚本将输出:
|
| 79 |
+
- 加载的文件统计信息
|
| 80 |
+
- 两个文件路径匹配的数量
|
| 81 |
+
- SRCC、KRCC、PLCC相关系数及其p值
|
| 82 |
+
- 用于计算的样本数
|
| 83 |
+
|
| 84 |
+
## 注意事项
|
| 85 |
+
|
| 86 |
+
- 确保两个文件中的路径格式相同,否则匹配可能失败
|
| 87 |
+
- JSON文件中必须包含`rel_path`和`clip_score`字段
|
| 88 |
+
- TXT文件每行必须包含一个路径和一个分数,以逗号分隔
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1000/000.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1000/001.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1000/002.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1000/003.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1000/004.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1000/005.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1000/006.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1000/007.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1008/000.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1008/001.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1008/002.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1008/003.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1008/004.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1008/005.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1008/006.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1008/007.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1014/000.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1014/001.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1014/002.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1014/003.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1014/004.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1014/005.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1014/006.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1014/007.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1044/000.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1044/001.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1044/002.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1044/003.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1044/004.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1044/005.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1044/006.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1044/007.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1046/000.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1046/001.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1046/002.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1046/003.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1046/004.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1046/005.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1046/006.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1046/007.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1051/000.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1051/001.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1051/002.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1051/003.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1051/004.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1051/005.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1051/006.png
ADDED
|
Git LFS Details
|
VQA_model/SimpleVQA-main/Frame/feel/action/edit_video/tokenflow/1051/007.png
ADDED
|
Git LFS Details
|