Git Product home page Git Product logo

Comments (4)

AliaksandrSiarohin avatar AliaksandrSiarohin commented on September 22, 2024 1

I never used serving. So I cant help you with that.
Also I would not advise you to use this models in production, the quality of generated images is rather low compared to production requirements. Moreover it will not generalize outside the dataset.
The closest thing I have is demo.py, usage is following:

  1. Put an image of your person to data/source_image.jpg
  2. Put image from which to extract pose to data/target_images
  3. Download pose estimator and some checkpoint (see Readme where)
  4. python demo.py --generator_checkpoint path_to_checkpoint --warp_skip mask --dataset dataset_name --cache_pose_rep 0
  5. Result should be in output/generated_images

There are already some images in the repository, you will need to remove them/

from pose-gan.

AliaksandrSiarohin avatar AliaksandrSiarohin commented on September 22, 2024 1

Ah, sorry. This was written for market. You should change resize in the line:

imsave(os.path.join(args.images_dir_test, os.path.basename(image_name)), resize(img, (128, 64)))

to (256, 256).

from pose-gan.

gayashanbc avatar gayashanbc commented on September 22, 2024

Thanks for the detailed explanation.
I'm getting the following error when I followed the above steps.
Traceback (most recent call last):
File "demo.py", line 108, in <module>
input_images, target_images, generated_images, names = generate_images(dataset, generator, args.use_input_pose)
File "/home/shan/Documents/pg/test.py", line 90, in generate_images
batch, name = dataset.next_generator_sample_test(with_names=True)
File "/home/shan/Documents/pg/pose_dataset.py", line 174, in next_generator_sample_test
batch = self.load_batch(index, False, True)
File "/home/shan/Documents/pg/pose_dataset.py", line 153, in load_batch
result = [self.load_image_batch(pair_df, 'from')]
File "/home/shan/Documents/pg/pose_dataset.py", line 131, in load_image_batch
batch[i] = imread(os.path.join(self._images_dir_test, p[direction]))

ValueError: could not broadcast input array from shape (128,64,3) into shape (256,256,3)

from pose-gan.

gayashanbc avatar gayashanbc commented on September 22, 2024

OK, it's working now
Thanks 😄

from pose-gan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.