Upload folder using huggingface_hub
Browse files
top5000_clipframe_dino_clipt_dedup/README_gemini_label.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Gemini Pro Aesthetic Labeling
|
| 2 |
+
|
| 3 |
+
This directory contains the deduplicated Top5000 high/low video package.
|
| 4 |
+
|
| 5 |
+
Generate API input and run a 10-item smoke test:
|
| 6 |
+
|
| 7 |
+
```bash
|
| 8 |
+
cd /inspire/hdd/project/intelligentcreativedesign/dangshengqi-253114050252/z-anna/low-high-new
|
| 9 |
+
export AESTHETIC_RM_API_KEY='your_api_key'
|
| 10 |
+
LIMIT=10 bash out/aesthetic_rm/top5000_clipframe_dino_clipt_dedup/run_gemini_pro_label.sh
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
Run all 5000:
|
| 14 |
+
|
| 15 |
+
```bash
|
| 16 |
+
export AESTHETIC_RM_API_KEY='your_api_key'
|
| 17 |
+
bash out/aesthetic_rm/top5000_clipframe_dino_clipt_dedup/run_gemini_pro_label.sh
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
Override model or output:
|
| 21 |
+
|
| 22 |
+
```bash
|
| 23 |
+
MODEL=gemini-3.1-pro-preview-thinking \
|
| 24 |
+
OUTPUT=out/aesthetic_rm/top5000_clipframe_dino_clipt_dedup/aesthetic_scores_gemini31thinking.jsonl \
|
| 25 |
+
bash out/aesthetic_rm/top5000_clipframe_dino_clipt_dedup/run_gemini_pro_label.sh
|
| 26 |
+
```
|
top5000_clipframe_dino_clipt_dedup/__pycache__/prepare_aesthetic_api_input.cpython-314.pyc
ADDED
|
Binary file (6.12 kB). View file
|
|
|
top5000_clipframe_dino_clipt_dedup/run_gemini_pro_label.sh
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
| 5 |
+
REPO_ROOT="$(cd "$BASE_DIR/../../.." && pwd)"
|
| 6 |
+
|
| 7 |
+
MODEL="${MODEL:-gemini-3.1-pro-preview-thinking}"
|
| 8 |
+
BASE_URL="${BASE_URL:-http://35.220.164.252:3888/v1}"
|
| 9 |
+
MAX_FRAMES="${MAX_FRAMES:-4}"
|
| 10 |
+
RESIZE="${RESIZE:-512}"
|
| 11 |
+
LIMIT="${LIMIT:-0}"
|
| 12 |
+
OUTPUT="${OUTPUT:-$BASE_DIR/aesthetic_scores_gemini_pro.jsonl}"
|
| 13 |
+
|
| 14 |
+
cd "$REPO_ROOT"
|
| 15 |
+
|
| 16 |
+
python3 "$BASE_DIR/prepare_aesthetic_api_input.py" \
|
| 17 |
+
--base-dir "$BASE_DIR" \
|
| 18 |
+
--input "$BASE_DIR/prompt.jsonl" \
|
| 19 |
+
--output "$BASE_DIR/aesthetic_api_input.jsonl"
|
| 20 |
+
|
| 21 |
+
cmd=(
|
| 22 |
+
python3 reference/benchmarks/critic/aesthetic_rm/label_aesthetic_api.py
|
| 23 |
+
--input "$BASE_DIR/aesthetic_api_input.jsonl"
|
| 24 |
+
--output "$OUTPUT"
|
| 25 |
+
--base-url "$BASE_URL"
|
| 26 |
+
--model "$MODEL"
|
| 27 |
+
--max-frames "$MAX_FRAMES"
|
| 28 |
+
--resize "$RESIZE"
|
| 29 |
+
--request-timeout 180
|
| 30 |
+
--max-retries 3
|
| 31 |
+
--input-cost-per-1m 3
|
| 32 |
+
--output-cost-per-1m 15
|
| 33 |
+
)
|
| 34 |
+
|
| 35 |
+
if [[ "$LIMIT" != "0" ]]; then
|
| 36 |
+
cmd+=(--limit "$LIMIT")
|
| 37 |
+
fi
|
| 38 |
+
|
| 39 |
+
"${cmd[@]}"
|