3d_animation_toolkit / examples /story_examples.py
abreza's picture
add storyDiffusion
3f01a25
import os
def get_image_path_list(folder_name):
image_basename_list = os.listdir(folder_name)
image_path_list = sorted([os.path.join(folder_name, basename)
for basename in image_basename_list])
return image_path_list
def array2string(arr):
stringtmp = ""
for i, part in enumerate(arr):
if i != len(arr)-1:
stringtmp += part + "\n"
else:
stringtmp += part
return stringtmp
def get_examples():
return [
[0, 0.5, 0.5, 2, "a man, wearing black suit",
"bad anatomy, bad hands, missing fingers, extra fingers, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, three crus, fused feet, fused thigh, extra crus, ugly fingers, horn, cartoon, cg, 3d, unreal, animate, amputation, disconnected limbs",
array2string(["at home, read new paper #at home, The newspaper says there is a treasure house in the forest.",
"on the road, near the forest",
"[NC] The car on the road, near the forest #He drives to the forest in search of treasure.",
"[NC]A tiger appeared in the forest, at night ",
"very frightened, open mouth, in the forest, at night",
"running very fast, in the forest, at night",
"[NC] A house in the forest, at night #Suddenly, he discovers the treasure house!",
"in the house filled with treasure, laughing, at night #He is overjoyed inside the house."
]),
"Comic book", "Only Using Textual Description", get_image_path_list(
'./examples/taylor'), 768, 768
],
[0, 0.5, 0.5, 2, "a policeman img, wearing a white shirt",
"bad anatomy, bad hands, missing fingers, extra fingers, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, three crus, fused feet, fused thigh, extra crus, ugly fingers, horn, cartoon, cg, 3d, unreal, animate, amputation, disconnected limbs",
array2string(["Directing traffic on the road. ",
"walking on the streets.",
"Chasing a man on the street.",
"At the police station.",
]),
"Japanese Anime", "Using Ref Images", get_image_path_list(
'./examples/lecun'), 768, 768
],
[1, 0.5, 0.5, 3, "a woman img, wearing a white T-shirt, blue loose hair",
"bad anatomy, bad hands, missing fingers, extra fingers, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, three crus, fused feet, fused thigh, extra crus, ugly fingers, horn, cartoon, cg, 3d, unreal, animate, amputation, disconnected limbs",
array2string(["wake up in the bed",
"have breakfast",
"is on the road, go to company",
"work in the company",
"Take a walk next to the company at noon",
"lying in bed at night"]),
"Japanese Anime", "Using Ref Images", get_image_path_list(
'./examples/taylor'), 768, 768
],
[0, 0.5, 0.5, 3, "a man, wearing black jacket",
"bad anatomy, bad hands, missing fingers, extra fingers, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, three crus, fused feet, fused thigh, extra crus, ugly fingers, horn, cartoon, cg, 3d, unreal, animate, amputation, disconnected limbs",
array2string(["wake up in the bed",
"have breakfast",
"is on the road, go to the company, close look",
"work in the company",
"laughing happily",
"lying in bed at night"
]),
"Japanese Anime", "Only Using Textual Description", get_image_path_list(
'./examples/taylor'), 768, 768
],
[0, 0.3, 0.5, 3, "a girl, wearing white shirt, black skirt, black tie, yellow hair",
"bad anatomy, bad hands, missing fingers, extra fingers, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, three crus, fused feet, fused thigh, extra crus, ugly fingers, horn, cartoon, cg, 3d, unreal, animate, amputation, disconnected limbs",
array2string([
"at home #at home, began to go to drawing",
"sitting alone on a park bench.",
"reading a book on a park bench.",
"[NC]A squirrel approaches, peeking over the bench. ",
"look around in the park. # She looks around and enjoys the beauty of nature.",
"[NC]leaf falls from the tree, landing on the sketchbook.",
"picks up the leaf, examining its details closely.",
"[NC]The brown squirrel appear.",
"is very happy # She is very happy to see the squirrel again",
"[NC]The brown squirrel takes the cracker and scampers up a tree. # She gives the squirrel cracker"]),
"Japanese Anime", "Only Using Textual Description", get_image_path_list(
'./examples/taylor'), 768, 768
]
]