MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / run

Function run

inference/img2hair.py:403–419  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

401
402
403def run():
404
405
406 path_strand_codec="./checkpoints/strand_vae/strand_codec.pt"
407 path_config = "./configs/config_scalp_texture_conditional.json"
408 path_diffusion_model_ckpt_path = "./checkpoints/difflocks_diffusion/scalp_v9_40k_06730000.pth" #longest trained one yet
409 path_material_model_ckpt_path = "./checkpoints/rgb2material/rgb2material.pt"
410
411 out_path="./outputs_inference/"
412
413 difflocks= DiffLocksInference(path_strand_codec, path_config, path_diffusion_model_ckpt_path, path_material_model_ckpt_path)
414
415
416 #run----
417 img_path="./samples/medium_11.png"
418 strand_points_world, hair_material_dict=difflocks.file2hair(img_path, out_path)
419 print("hair_material_dict",hair_material_dict)
420
421
422

Callers 5

img2hair.pyFile · 0.70
DeterminantKernelFunction · 0.50
InverseKernelFunction · 0.50
InverseKernelWithDetFunction · 0.50
coeffMethod · 0.50

Calls 2

file2hairMethod · 0.95
DiffLocksInferenceClass · 0.85

Tested by

no test coverage detected