chahuja / mix-stage

Official Repository for the paper Style Transfer for Co-Speech Gesture Animation: A Multi-Speaker Conditional-Mixture Approach published in ECCV 2020 (https://arxiv.org/abs/2007.12553)
http://chahuja.com/mix-stage
Other
29 stars 9 forks source link

No module named pycasper #6

Closed AhmedHashish123 closed 3 years ago

AhmedHashish123 commented 3 years ago

I followed the steps in the "Set Up Environment" section and a folder named pycasper was created. The problem is that this folder is outside "mix-stage" folder. So, files can't find the module. Should I transfer the pycasper directory inside "mix-stage" directory? Or should I transfer it to the model directory inside src directory inside "mix-stage"?

chahuja commented 3 years ago

I would recommend running the following command after going to the folder mix-stage/src,

cd mix-stage/src
ln -s ../../pycasper/pycasper .

This will create a symlink (or shortcut of the library inside of mix-stage). That should get rid of the errors.

Another way, which you suggested, is copying the pycasper directory inside of src. Just be careful and copy the pycasper folder within the pycasper github folder.

cp -r pycasper/pycasper mix-stage/src
AhmedHashish123 commented 3 years ago

Thanks, but now I get an error: Results Loaded model.trainer.TrainerJointLateClusterStyleGAN selected Results Loaded Traceback (most recent call last): File "sample.py", line 34, in argparseNloop(loop) File "/content/mix-stage/src/argsUtils.py", line 258, in argparseNloop loop(args, i) File "sample.py", line 21, in loop trainer = Trainer(args, args_subset, args_dict_update) File "/content/mix-stage/src/model/trainer.py", line 1346, in init super().init(args, args_subset, args_dict_update) File "/content/mix-stage/src/model/trainer.py", line 1245, in init super(TrainerGAN, self).init(args, args_subset, args_dict_update) File "/content/mix-stage/src/model/trainer.py", line 104, in init self.data, self.data_train, self.data_dev, self.data_test = self.get_data() File "/content/mix-stage/src/model/trainer.py", line 208, in get_data weighted=self.args.weighted, filler=self.args.filler, num_training_iters=self.args.num_training_iters) File "/content/mix-stage/src/data/dataUtils.py", line 92, in init super().init(path2data=path2data) File "/content/mix-stage/src/data/common.py", line 112, in init self.df = pd.read_csv(Path(self.path2data)/'cmu_intervals_df.csv', dtype=object) File "/usr/local/lib/python3.7/dist-packages/pandas/io/parsers.py", line 688, in read_csv return _read(filepath_or_buffer, kwds) File "/usr/local/lib/python3.7/dist-packages/pandas/io/parsers.py", line 454, in _read parser = TextFileReader(fp_or_buf, kwds) File "/usr/local/lib/python3.7/dist-packages/pandas/io/parsers.py", line 948, in init self._make_engine(self.engine) File "/usr/local/lib/python3.7/dist-packages/pandas/io/parsers.py", line 1180, in _make_engine self._engine = CParserWrapper(self.f, self.options) File "/usr/local/lib/python3.7/dist-packages/pandas/io/parsers.py", line 2010, in init self._reader = parsers.TextReader(src, **kwds) File "pandas/_libs/parsers.pyx", line 382, in pandas._libs.parsers.TextReader.cinit File "pandas/_libs/parsers.pyx", line 674, in pandas._libs.parsers.TextReader._setup_parser_source FileNotFoundError: [Errno 2] No such file or directory: '../data/cmu_intervals_df.csv'

when I try to get an example of sampling gesture animations from a pretrained model using the command that you provided in the repo:

python sample.py \ -load save/pretrained_models/multi-speaker/exp_3659_cpk_JointLateClusterSoftStyle4_Gspeaker[\'corden\',\ \'lec_cosmic\']_model_JointLateClusterSoftStyle4_G_note_s2g_gst_mixgan15_weights.p \ -path2data ../data

chahuja commented 3 years ago

There should be a file at .. data/cmu_intervals_df.csv which is a part of the dataset. Sample.py does not work without the dataset.

On Fri, Sep 24, 2021, 7:58 PM Ahmed Hashish @.***> wrote:

Thanks, but now I get an error: Results Loaded model.trainer.TrainerJointLateClusterStyleGAN selected Results Loaded Traceback (most recent call last): File "sample.py", line 34, in argparseNloop(loop) File "/content/mix-stage/src/argsUtils.py", line 258, in argparseNloop loop(args, i) File "sample.py", line 21, in loop trainer = Trainer(args, args_subset, args_dict_update) File "/content/mix-stage/src/model/trainer.py", line 1346, in init super().init(args, args_subset, args_dict_update) File "/content/mix-stage/src/model/trainer.py", line 1245, in init super(TrainerGAN, self).init(args, args_subset, args_dict_update) File "/content/mix-stage/src/model/trainer.py", line 104, in init self.data, self.data_train, self.data_dev, self.data_test = self.get_data() File "/content/mix-stage/src/model/trainer.py", line 208, in get_data weighted=self.args.weighted, filler=self.args.filler, num_training_iters=self.args.num_training_iters) File "/content/mix-stage/src/data/dataUtils.py", line 92, in init super().init(path2data=path2data) File "/content/mix-stage/src/data/common.py", line 112, in init self.df = pd.read_csv(Path(self.path2data)/'cmu_intervals_df.csv', dtype=object) File "/usr/local/lib/python3.7/dist-packages/pandas/io/parsers.py", line 688, in read_csv return _read(filepath_or_buffer, kwds) File "/usr/local/lib/python3.7/dist-packages/pandas/io/parsers.py", line 454, in _read parser = TextFileReader(fp_or_buf, kwds) File "/usr/local/lib/python3.7/dist-packages/pandas/io/parsers.py", line 948, in init self._make_engine(self.engine) File "/usr/local/lib/python3.7/dist-packages/pandas/io/parsers.py", line 1180, in _make_engine self._engine = CParserWrapper(self.f, self.options) File "/usr/local/lib/python3.7/dist-packages/pandas/io/parsers.py", line 2010, in init self._reader = parsers.TextReader(src, *kwds) File "pandas/_libs/parsers.pyx", line 382, in pandas._libs.parsers.TextReader.cinit* File "pandas/_libs/parsers.pyx", line 674, in pandas._libs.parsers.TextReader._setup_parser_source FileNotFoundError: [Errno 2] No such file or directory: '../data/cmu_intervals_df.csv'

when I try to get an example of sampling gesture animations from a pretrained model using the command that you provided in the repo:

python sample.py -load save/pretrained_models/multi-speaker/exp_3659_cpk_JointLateClusterSoftStyle4_Gspeaker['corden',\ 'lec_cosmic']_model_JointLateClusterSoftStyle4_G_note_s2g_gst_mixgan15_weights.p

-path2data ../data

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/chahuja/mix-stage/issues/6#issuecomment-926985561, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABS4KVOUATSPODVRLTZRROTUDUNDTANCNFSM5EWBVI2Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

AhmedHashish123 commented 3 years ago

Isn't there an inference script that takes a certain input and provides an output?

AhmedHashish123 commented 3 years ago

I'm using the pretrained models so I thought that I wouldn't need the dataset

chahuja commented 3 years ago

Unfortunately not at the moment. This was just meant to recreate results of the paper.

I'll probably get to writing such a script at some point, but not sure if that's in the cards for the near future.

On Fri, Sep 24, 2021, 9:19 PM Ahmed Hashish @.***> wrote:

Isn't there an inference script that takes a certain input and provides an output?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/chahuja/mix-stage/issues/6#issuecomment-926996019, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABS4KVLQMJPT3TOSUKEDXJLUDUWR7ANCNFSM5EWBVI2Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

AhmedHashish123 commented 3 years ago

Ok, thank you for replying.