svjack commited on
Commit
b31a1c0
·
verified ·
1 Parent(s): 0933cd2

Update genshin_impact_couple_app.py

Browse files
Files changed (1) hide show
  1. genshin_impact_couple_app.py +9 -6
genshin_impact_couple_app.py CHANGED
@@ -12,6 +12,13 @@ import random
12
  # Fix the random seed for reproducibility
13
  random.seed(42) # You can use any fixed number as the seed
14
 
 
 
 
 
 
 
 
15
  # 下载数据集
16
  repo_id = "svjack/3DitScene_cache"
17
  folder_path = "Genshin-Impact-Couple-with-Tags-IID-Gender-Only-Two-Joy-Caption_Head10"
@@ -34,15 +41,11 @@ for example in dataset:
34
  'joy-caption': example['joy_caption_surrounding']
35
  })
36
 
37
- # 定义可用的 gen_camerapath 和 render_camerapath 选项
38
- gen_camerapath_options = ['lookaround', 'lookdown', 'rotate360']
39
- render_camerapath_options = ['back_and_forth', 'llff', 'headbanging']
40
-
41
  # 为每个例子随机分配 gen_camerapath 和 render_camerapath
42
  examples_with_combinations = []
43
  for example in examples:
44
- gen_camerapath = random.choice(gen_camerapath_options)
45
- render_camerapath = random.choice(render_camerapath_options)
46
  examples_with_combinations.append({
47
  'image': example['image'],
48
  'joy-caption': example['joy-caption'],
 
12
  # Fix the random seed for reproducibility
13
  random.seed(42) # You can use any fixed number as the seed
14
 
15
+ # Define common combinations
16
+ common_combinations = [
17
+ ("lookaround", "back_and_forth"), # Most common
18
+ ("lookdown", "back_and_forth"), # Less common
19
+ ("rotate360", "headbanging") # Rare
20
+ ]
21
+
22
  # 下载数据集
23
  repo_id = "svjack/3DitScene_cache"
24
  folder_path = "Genshin-Impact-Couple-with-Tags-IID-Gender-Only-Two-Joy-Caption_Head10"
 
41
  'joy-caption': example['joy_caption_surrounding']
42
  })
43
 
 
 
 
 
44
  # 为每个例子随机分配 gen_camerapath 和 render_camerapath
45
  examples_with_combinations = []
46
  for example in examples:
47
+ # Randomly select a combination from common_combinations
48
+ gen_camerapath, render_camerapath = random.choice(common_combinations)
49
  examples_with_combinations.append({
50
  'image': example['image'],
51
  'joy-caption': example['joy-caption'],