alex commited on
Commit
163943b
·
1 Parent(s): 8c76b2e
Files changed (2) hide show
  1. app.py +4 -2
  2. src/eval/generate_samples.py +0 -2
app.py CHANGED
@@ -137,10 +137,12 @@ def make_sample(
137
  }
138
  return sample
139
 
 
 
140
  pipe = load_ctrlv_pipelines(
141
  "AnthonyGosselin/Ctrl-Crash",
142
  use_null_model=True,
143
- use_factor_guidance=False
144
  )
145
 
146
  def run_yolo_sam_on_image(
@@ -214,7 +216,7 @@ def run_one(
214
  json_path=os.path.join(out_dir, "gt_frames_minimal.json"),
215
  bbox_mask_frames=bbox_mask_frames,
216
  action_type=sample["action_type"].unsqueeze(0),
217
- use_factor_guidance=True,
218
  guidance=list(guidance),
219
  video_path2=None,
220
  )
 
137
  }
138
  return sample
139
 
140
+ g_use_factor_guidance = True
141
+
142
  pipe = load_ctrlv_pipelines(
143
  "AnthonyGosselin/Ctrl-Crash",
144
  use_null_model=True,
145
+ use_factor_guidance=g_use_factor_guidance
146
  )
147
 
148
  def run_yolo_sam_on_image(
 
216
  json_path=os.path.join(out_dir, "gt_frames_minimal.json"),
217
  bbox_mask_frames=bbox_mask_frames,
218
  action_type=sample["action_type"].unsqueeze(0),
219
+ use_factor_guidance=g_use_factor_guidance,
220
  guidance=list(guidance),
221
  video_path2=None,
222
  )
src/eval/generate_samples.py CHANGED
@@ -153,8 +153,6 @@ def generate_video_ctrlv(sample, pipeline, video_path="video_out/genvid", json_p
153
  bbox_images = sample['bbox_images'].unsqueeze(0)
154
  action_type = sample['action_type'].unsqueeze(0) if action_type is None else action_type
155
 
156
- print(f'final action type {action_type}')
157
-
158
  sample['bbox_images'].to(device)
159
 
160
  # Save GT frame paths to json file
 
153
  bbox_images = sample['bbox_images'].unsqueeze(0)
154
  action_type = sample['action_type'].unsqueeze(0) if action_type is None else action_type
155
 
 
 
156
  sample['bbox_images'].to(device)
157
 
158
  # Save GT frame paths to json file