-
Notifications
You must be signed in to change notification settings - Fork 0
Generation mode with format json files
Mode 10 generates custom A-B|C-D interpolation with A,B,C,D as defined in the input json file. Use option interp_json
. For example: --interp_json=interp.json
{ "base_dir" : "samples/garden-256x256-rotate",
"data" : [["RandGen_20180925-162932_00151", "RandGen_20180925-162932_00365", 12],
["RandGen_20180925-162932_00290", "RandGen_20180925-162932_00400", 24],
["RandGen_20180925-162932_00390", "RandGen_20180925-162932_00440", 39],
["RandGen_20180925-162932_00294", "RandGen_20180925-162932_00295", 73]]}
base_dir
is the base directory where files RandGen_20180925-162932_00151.json
, etc lies.
Data defines the structure of the interpolation. For example [[<A>, <B>, 12], [<C>, <D>, 24]]
will interpolate from A
to B
in 12 frames inclusive of both A
and B
, then interpolate between C
and D
in 24 frames.
There is a bug in the code that is causing the first and last frame of interpolation to be not perfectly the same as the image defined through the json file. Image on the left below is the original image, and on the right is the slightly different image generated by mode 10.
We tried a few things:
Eliminating the spherical lerp slerp
function.
Appending the python array of seedA, seedB into an empty array and then converting it to numpy array (which is the way it's done in other modes with json input) instead of converting seedA, seedB into numpy array and then concatenating them.
We also tried using the same seed json file with other modes with json seed input and found out that the other modes are reading and generating the image correctly. When the same image was inputted into mode 10, the image was slightly different. From this test, we know the problem doesn't lie in reading/writing the seed json file.