Open-Sora/tools/scoring
2024-04-02 11:13:41 +08:00
..
aesthetic update scoring 2024-04-02 11:13:41 +08:00
optical_flow update scoring 2024-04-02 11:13:41 +08:00
__init__.py update data processing 2024-04-02 10:51:40 +08:00
README.md update scoring 2024-04-02 11:13:41 +08:00

Data Scoring and Filtering

Important!!! All scoring jobs require these columns in meta files:

  • path: absolute path to a sample

Aesthetic Score

First prepare the environment and pretrained models.

# install clip
pip install git+https://github.com/openai/CLIP.git
pip install decord

# get pretrained model
wget https://github.com/christophschuhmann/improved-aesthetic-predictor/raw/main/sac+logos+ava1-l14-linearMSE.pth -O pretrained_models/aesthetic.pth

Then run:

# output: DATA_aes.csv
python -m tools.scoring.aesthetic.inference /path/to/meta.csv

The output should be /path/to/meta_aes.csv with column aes. Aesthetic scores range from 1 to 10, with 10 being the best quality.

Optical Flow Score

First get the pretrained model.

wget https://s3.eu-central-1.amazonaws.com/avg-projects/unimatch/pretrained/gmflow-scale2-regrefine6-mixdata-train320x576-4e7b215d.pth -P pretrained_models/unimatch

Then run:

python tools/scoring/optical_flow/inference.py /path/to/meta.csv

The output should be /path/to/meta_flow.csv with column flow. Higher optical flow scores indicate larger movement.

Matching Score

Require column text in meta files, which is the caption of the sample.

TODO.