Commit 92b02f36 authored by Nikos Athanasiou's avatar Nikos Athanasiou
Browse files

cahnges to readme,few stuff to rendering also

parent 58060523
......@@ -68,22 +68,10 @@ Explore `configs/train.yaml` to change some basic things like where you want
your output stored, which data you want to choose if you want to do a small
experiment on a subset of the data etc.
`python data=babel-amass`
For KIT:
`python data=kit-mmm-xyz`
For sampling do. KIT case:
` python folder=/is/cluster/nathanasiou/experimentals/teach/kit-mmm-xyz/baseline/2awlfcm9`
BABEL case:
For sampling do.
`python folder=/is/cluster/work/nathanasiou/experiments/teach/babel-amass/babel-full/rot-5secs-full-sched-lr number_of_samples=3 fact=1.1`
`python folder=/path/to/experiment align=full slerp_ws=8`
In general it is: `folder_our/<project>/<dataname_config>/<experimet>/<run_id>`
......@@ -131,16 +119,6 @@ For fast rendering(less than 30" / per video):
`python dim=2 folder=/ps/scratch/nathanasiou/oracle_experiments/kit-temos-version/1v6vh9w2/path/to/npys/files`
check `dim` parameter for 2d/3d rendering.
``` python folder=/is/cluster/work/nathanasiou/experiments/teach/kit-mmm-xyz/debug-exps/kit-pos-mmm input=/home/nathanasiou/Desktop/conditional_action_gen/commands.txt output=/home/nathanasiou/Desktop/interactions/ dim=2```
`text-prompt.txt` is a file that looks likes:
walk forward
and check the durs key in the configuration to add durations. You can do `durs='[<dur1_in_secs>, <dur2_in_secs>, ...]'`. The video outputs will be saved in the absolute output directory.
Your experiments will be always structured like this(see `train.yaml`):
......@@ -152,5 +130,3 @@ Your experiments will be always structured like this(see `train.yaml`):
`/is/cluster/work/nathanasiou/blender/blender-3.1.2-linux-x64/3.1/python/bin » ./python3.10 -m pip install moviepy`
`blender or cluster_blender --background --python -- npy=path/to/file.npy`
`python cluster/ --folder /some/folder/path/or/file --mode render --bid 100`
`python folder=/is/cluster/work/nathanasiou/experiments/teach/babel-amass/teach-post-submission/joint slerp=false jointstype=joints mode=free-text`
\ No newline at end of file
from dataclasses import asdict
import subprocess
from pathlib import Path
import sys
from loguru import logger
import glob
def end_script():
from inspect import currentframe, getframeinfo
frameinfo = getframeinfo(currentframe())
sys.exit(f'Exited after line {frameinfo.filename} {frameinfo.lineno}')
def run(cmd):"Executing: {' '.join(cmd)}")
x =
# teach/independent sampling
voutdir = "./for_site/videos"
ioutdir = "./for_site/images"
outdir = "./for_site/"
prompts = [('[stand with bent knees, kick with right leg, kick with left foot]', '[0.7, 1.2, 2.3]'),
('[jump with left foot, walk backwards, crawl]', '[1.5, 1.5, 2]'),
('[jump forwards, walk with knees bent, sit down]', '[2.1, 2.8, 2]'),
('[jump with left foot, walk forwards, sit down]', '[1.5, 2.5, 2]'),
('[walk like a drunk, stumble over something, fall down]', '[1.9, 1.2, 1.4]'),
('[hop forward, squat down, crouch, lay on a bench]', '[2, 1.5, 1.9, 2.5]'),
('[pick an object from the ground, carry object, lift object with right hand, put object on table]', '[1.5, 1.1, 1.2, 1]'),
('[pick an object from the ground, lift object with right hand, put object on the ground]', '[1.5, 1.1, 1.2]'),
('[balance on two feet, perform yoga pose, stretch arms, step forward with left foot]', '[2.8, 1.8, 1.8, 1.2]'),
('[scratch head with right hand, limp forward, turn around, knock, open the door]', '[0.8, 2.5, 1.1, 1, 1.5]'),
('[walk backwards, grab item with left hand, prepare drink, drink]', '[2.1, 1.1, 3.1, 1.5]'),
('[right side lunges, left side lunges]', '[1.5, 1.9]'),
('[hold golf club while look at the ground, swing golf club, jog forward, kneel down]', '[0.8, 1.4, 1.2, 1.3]'),
('[punches with right hand,punches with left hand, kung fu pose, sidekick motion with right foot]', '[1, 1, 1.2, 1.2]'),
('[rolls left ankle in front of body, swings full left leg forwards and backwards in front of body]', '[2.8, 3.2]'),
('[rotate neck, swing left leg in and out]', '[1.4, 4.9]'),
('[throw ball, catch ball with left hand, toss ball with left hand, drop ball in front of right foot]', '[1.2, 1.3, 1.2,0.8]'),
('[grab ball with both hands, bounce basketball, shoots basketball]', '[0.7,1.6,1.2]'),
('[step back, shoot basketball, run forwards]', '[2, 2, 2.1]'),
('[walk on toes, turn right,lie down on floor]', '[3,1,2.1]'),
('[step on the left, sit down, play the piano]', '[1.1, 1.2, 1.1]'),
('[play an instrument, nod head, wave right arm]', '[1, 0.3, 1]'),
('[stretch to side bend over, stretch head, play violin]', '[1.9, 1.6, 2.8]'),
('[wave left hand, raise right hand, step to the right, walk in a circle, sit down, stand up, hop over obstacle]', '[1.1, 1.2, 1.5, 2.5, 1.8,1, 1.9]'),
('[jump backwards, jump forwards, roll right arm, spin arms in circles]', '[1, 1.2, 1.6, 1.7]'),
('[lift object up, spin arms, jump spin]', '[1.7, 1.6, 1.2]'),
('[walk up stairs, walk down stairs backwards, climb up]', '[1.2, 1.1, 1.3]')]
nos = 3
for i, (text, dur) in enumerate(prompts):
for j in range(nos):
cmd = ['python', '', f'folder={exp_path}', f'output={outdir}/example-{i}', 'samples=3', f'texts={text}', f'durs={dur}']
......@@ -6,6 +6,8 @@ from omegaconf import DictConfig, OmegaConf
from import DataLoader
import teach.launch.prepare # noqa
from hydra.utils import get_original_cwd
from import save_video_samples
from teach.render.mesh_viz import visualize_meshes
import torch
from tqdm import tqdm
import pytorch_lightning as pl
......@@ -68,8 +70,8 @@ def interact(newcfg: DictConfig) -> None:'{cfg.output}_sample-{index}.npy',
{'motion': motion.numpy(), 'text': texts, 'lengths': lengths} )"The motion is saved there: {cfg.output}")
vid_ = visualize_meshes(motion.numpy())
save_video_samples(vid_, {cfg.output}_sample-{index}, texts, fps=30)
if __name__ == '__main__':
<table border="1" class="dataframe table table-striped text-center">
<th colspan="4" halign="left">APE</th>
<th colspan="4" halign="left">AVE</th>
\ No newline at end of file
......@@ -223,6 +223,9 @@ def render(npydata, frames_folder, *, mode, faces_path,
delete_objs(["Plane", "myCurve", "Cylinder"])
# fn = frames_folder.split('/')[-1]
# bpy.ops.wm.save_as_mainfile(filepath=f'{os.getcwd()}/{fn}-vertices.blend')
# exit()
# render in the end only
if not separate_actions and mode == 'sequence':
......@@ -232,8 +235,6 @@ def render(npydata, frames_folder, *, mode, faces_path,
delete_objs(["Plane", "myCurve", "Cylinder"])
# bpy.ops.wm.save_as_mainfile(filepath="~/file.blend")
# exit()
if mode == "video":
return frames_folder
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment