Closed mayanktiwariiiitdmj closed 3 years ago
Sorry, I can't do that for you because I don't know what exactly you are trying to do, what's your environment, what's your file structure etc. Instead, can you elaborate more on this:
Because argument
--help
is not helping much in many cases.
and can you tell me exactly what's unclear in --help
because I designed it to be detailed enough for anyone to understand how to run the script.
So, specifically: please tell what you saw in --help
, how you interpreted it, and what you tried. I'll try to clarify.
sir, generally when we check any project, then apart from the syntax to execute any file, one example with complete set of arguments is also provided. This helps us in deployment of the project in our own machine.
In the current case when I am executing the command python drive.py --help
then I am getting the following output:
python drive.py --help
usage: drive.py [-h] [--images_paths IMAGES_PATHS [IMAGES_PATHS ...]]
--destination DESTINATION
checkpoint_path data_root
Render 'puppeteering' videos, given a fine-tuned model and driving images.
Be careful: inputs have to be preprocessed by 'utils/preprocess_dataset.sh'.
positional arguments:
checkpoint_path Path to the *.pth checkpoint of a fine-tuned neural renderer model.
data_root Driving images' source: "root path" that contains folders
like 'images-cropped', 'segmentation-cropped-ffhq', or 'keypoints-cropped'.
optional arguments:
-h, --help show this help message and exit
--images_paths IMAGES_PATHS [IMAGES_PATHS ...]
Driving images' sources: paths to folders with driving images, relative to '`--data_root`/images-cropped' (note: here 'images-cropped' is the checkpoint's `args.img_dir`). Example: "id01234/q2W3e4R5t6Y monalisa".
--destination DESTINATION
Where to put the resulting videos: path to an existing folder.
from the about output I have interpreted that I have to execute drive.py by providing optional arguments and positional arguments (optional arguments will be provided by --args_name args_value and positional arguments will be provided at a particular position). By considering this information when I am executing the command as:
python3 drive.py outputs/tony_hawk_take_1/checkpoints/model_02715367.pth results/ --destination results/ --images_path DATASET_ROOT/images-cropped/personA/
Then, I am getting some error. Sir, hence I requested you to provide the examples of running the scripts.
Please help me.
First, it's not --images_path
but --images_paths
. Also, help suggests that --images_paths
should be paths relative to '--data_root
/images-cropped', which in your case is 'DATASET_ROOT/images-cropped'. So it should be just 'personA' (? I think).
sir, after correcting images_path to images_paths as suggested by you above, when I am running the code using the following command:
python3 drive.py outputs/tony_hawk_take_1/checkpoints/model_02715367.pth DATASET_ROOT/ --destination results/ --images_paths DATASET_ROOT/images-cropped/personA/
(based on the --help, after the file name drive.py I have set values for positional arguments checkpoint_path and data_root, then I have set values for optional arguments --destination and --images_paths, then I am getting the following error:
2021-03-30 15:56:00,907 - INFO - Will run on device 'cuda:0'
2021-03-30 15:56:00,907 - INFO - Loading checkpoint from 'outputs/tony_hawk_take_1/checkpoints/model_02715367.pth'
2021-03-30 15:56:01,190 - INFO - Loading embedder 'unsupervised_pose_separate_embResNeXt_segmentation'
2021-03-30 15:56:03,269 - INFO - Loading generator 'vector_pose_unsupervised_segmentation_noBottleneck'
2021-03-30 15:56:03,627 - INFO - Loading discriminator 'no_landmarks'
2021-03-30 15:56:03,860 - INFO - Loading dataloader 'voxceleb2_segmentation_nolandmarks'
2021-03-30 15:56:04,101 - INFO - Determining the 'val' data source
2021-03-30 15:56:04,101 - INFO - Checking if 'DATASET_ROOT/images-cropped/DATASET_ROOT/images-cropped/personA' is a directory...
2021-03-30 15:56:04,101 - INFO - No, it isn't
2021-03-30 15:56:04,101 - INFO - Checking if 'DATASET_ROOT/images-cropped/personA' is a file...
2021-03-30 15:56:04,101 - INFO - No, it isn't
2021-03-30 15:56:04,101 - INFO - Checking if 'DATASET_ROOT/images-cropped' is a directory...
2021-03-30 15:56:04,101 - INFO - Yes, it is; found 3 val identities in it
Traceback (most recent call last):
File "drive.py", line 78, in <module>
dataloader = Dataloader(saved_args.dataloader).get_dataloader(saved_args, part='val', phase='val')
File "/home/nitin/latent-pose-reenactment/dataloaders/dataloader.py", line 28, in get_dataloader
dataset = self.dataset.get_dataset(args, part)
File "/home/nitin/latent-pose-reenactment/dataloaders/voxceleb2_segmentation_nolandmarks.py", line 33, in get_dataset
dirlist = voxceleb.get_part_data(args, part)
File "/home/nitin/latent-pose-reenactment/dataloaders/common/voxceleb.py", line 85, in get_part_data
raise NotImplementedError("Sorry, fine-tuning to multiple identities is not yet available")
NotImplementedError: Sorry, fine-tuning to multiple identities is not yet available
Please read my previous comment again.
when I am running
drive.py
as:then I am getting the following exception:
I request you to please provide a complete command wise example with an idea of folder structures of the project. This will help us in executing the project without any problem. Because argument
--help
is not helping much in many cases.