AliaksandrSiarohin / motion-cosegmentation

Reference code for "Motion-supervised Co-Part Segmentation" paper
Other
653 stars 142 forks source link

New error #62

Open rdrlima opened 1 year ago

rdrlima commented 1 year ago

A new error on load checkpoints

TypeError Traceback (most recent call last) in 3 reconstruction_module, segmentation_module = load_checkpoints(config='config/vox-256-sem-10segments.yaml', 4 checkpoint='/content/gdrive/My Drive/motion-supervised-co-segmentation/vox-10segments.pth.tar', ----> 5 blend_scale=1)

/content/motion-co-seg/part_swap.py in load_checkpoints(config, checkpoint, blend_scale, first_order_motion_model, cpu) 103 def load_checkpoints(config, checkpoint, blend_scale=0.125, first_order_motion_model=False, cpu=False): 104 with open(config) as f: --> 105 config = yaml.load(f) 106 107 reconstruction_module = PartSwapGenerator(blend_scale=blend_scale,

TypeError: load() missing 1 required positional argument: 'Loader'

xana7har commented 1 year ago

I had to downgrade my pyyaml below 6.0 pip install pyyaml==5.4.1

G-force78 commented 11 months ago

import yaml from yaml import safe_load def load_checkpoints(config_path, checkpoint_path, cpu=False): with open(config_path) as f: config = yaml.load(f, Loader=yaml.SafeLoader)