A simple python library for fast image generation of people who do not exist.

Overview

Random Face

A simple python library for fast image generation of people who do not exist.

For more details, please refer to the [paper](https://arxiv.org/abs/2104.04767).

Requirements

  • Linux, Windows, MacOS
  • Python 3.8+
  • CPU compatible with OpenVINO.

Install package

pip install random_face

Install the latest version

git clone https://github.com/bes-dev/random_face.git
cd random_face
pip install -r requirements.txt
python download_model.py
pip install .

Demo

python -m random_face.demo

Example

import cv2
import random_face

engine = random_face.get_engine()
face = engine.get_random_face()
cv2.imshow("face", face)
cv2.waitKey()

Open In Colab Open In Gradio

Citation

@misc{belousov2021mobilestylegan,
      title={MobileStyleGAN: A Lightweight Convolutional Neural Network for High-Fidelity Image Synthesis},
      author={Sergei Belousov},
      year={2021},
      eprint={2104.04767},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}
You might also like...
A simple command line tool for text to image generation, using OpenAI's CLIP and a BigGAN.
A simple command line tool for text to image generation, using OpenAI's CLIP and a BigGAN.

Ryan Murdock has done it again, combining OpenAI's CLIP and the generator from a BigGAN! This repository wraps up his work so it is easily accessible to anyone who owns a GPU.

This is the official repo for TransFill:  Reference-guided Image Inpainting by Merging Multiple Color and Spatial Transformations at CVPR'21. According to some product reasons, we are not planning to release the training/testing codes and models. However, we will release the dataset and the scripts to prepare the dataset. A fast poisson image editing implementation that can utilize multi-core CPU or GPU to handle a high-resolution image input.
A fast poisson image editing implementation that can utilize multi-core CPU or GPU to handle a high-resolution image input.

Poisson Image Editing - A Parallel Implementation Jiayi Weng (jiayiwen), Zixu Chen (zixuc) Poisson Image Editing is a technique that can fuse two imag

Python wrappers to the C++ library SymEngine, a fast C++ symbolic manipulation library.

SymEngine Python Wrappers Python wrappers to the C++ library SymEngine, a fast C++ symbolic manipulation library. Installation Pip See License section

Simple-Image-Classification - Simple Image Classification Code (PyTorch)
Simple-Image-Classification - Simple Image Classification Code (PyTorch)

Simple-Image-Classification Simple Image Classification Code (PyTorch) Yechan Kim This repository contains: Python3 / Pytorch code for multi-class ima

A python software that can help blind people find things like laptops, phones, etc the same way a guide dog guides a blind person in finding his way.

GuidEye A python software that can help blind people find things like laptops, phones, etc the same way a guide dog guides a blind person in finding h

Code for
Code for "Layered Neural Rendering for Retiming People in Video."

Layered Neural Rendering in PyTorch This repository contains training code for the examples in the SIGGRAPH Asia 2020 paper "Layered Neural Rendering

Implementation for the paper SMPLicit: Topology-aware Generative Model for Clothed People (CVPR 2021)
Implementation for the paper SMPLicit: Topology-aware Generative Model for Clothed People (CVPR 2021)

SMPLicit: Topology-aware Generative Model for Clothed People [Project] [arXiv] License Software Copyright License for non-commercial scientific resear

People movement type classifier with YOLOv4 detection and SORT tracking.
People movement type classifier with YOLOv4 detection and SORT tracking.

Movement classification The goal of this project would be movement classification of people, in other words, walking (normal and fast) and running. Yo

Comments
  • Explicitly specified the compatible openvino library version

    Explicitly specified the compatible openvino library version

    The latest openvino library 2022.x version is incompatible with this library. Hence updated the requirements file to specify the last compatible version of openvino library. Now the error is fixed and the library is working properly.

    More details are in https://github.com/bes-dev/random_face/issues/6

    bug 
    opened by comprakash 3
  • description of input/ouput of the models

    description of input/ouput of the models

    Hi, I've been trying to use the models using another framework, I tried to follow the python code to define de input and output of the two models unsuccessfully.

    So far I got:

    512 random values > Style model > 512 style values, truncated? > Synthesys model > final image.

    Should the random values be between 0 and 1? any additional requirement?

    So I need to know the expected values for each input/output, and how to truncate the style values.

    opened by vpenades 1
  • Error: Argument shapes are inconsistent

    Error: Argument shapes are inconsistent

    I am getting an error while trying a simple program. Could you please assist on how to fix this issue.

    engine = random_face.get_engine() random_face = engine.get_random_face()

    Traceback (most recent call last): File "./scripts/generate_random_fvs.py", line 8, in engine = random_face.get_engine() File "/home/omprakash/github/CassiniServer/venv/lib/python3.8/site-packages/random_face/random_face.py", line 29, in get_engine return EngineOpenvino(cfg) File "/home/omprakash/github/CassiniServer/venv/lib/python3.8/site-packages/random_face/engine_openvino.py", line 39, in init self.snet_exec = self.ie.load_network(network=self.snet, device_name="CPU") File "ie_api.pyx", line 413, in openvino.inference_engine.ie_api.IECore.load_network File "ie_api.pyx", line 457, in openvino.inference_engine.ie_api.IECore.load_network RuntimeError: Check 'PartialShape::broadcast_merge_into(pshape, node->get_input_partial_shape(i), autob)' failed at core/src/op/util/elementwise_args.cpp:30: While validating node 'v1::Multiply Multiply_9566 (Mul_39_copy[0]:f32{512,512,3,3}, Constant_9519[0]:f32{1,512,4,4}) -> (dynamic...)' with friendly_name 'Multiply_9566': Argument shapes are inconsistent.

    opened by OmPrakash4 1
  • how solve this issue?

    how solve this issue?

    Processing time: 0.1736280918121338 s.
    Press 'q' for quit
    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/lib/python3.8/dist-packages/cv2/qt/plugins" even though it was found.
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
    
    Available platform plugins are: xcb.
    
    Aborted (core dumped)
    
    opened by johnfelipe 1
Releases(2021.07.21.1)
Owner
Sergei Belousov
Sergei Belousov
This game was designed to encourage young people not to gamble on lotteries, as the probablity of correctly guessing the number is infinitesimal!

Lottery Simulator 2022 for Web Launch Application Developed by John Seong in Ontario. This game was designed to encourage young people not to gamble o

John Seong 2 Sep 2, 2022
Image-generation-baseline - MUGE Text To Image Generation Baseline

MUGE Text To Image Generation Baseline Requirements and Installation More detail

null 23 Oct 17, 2022
This repository contains several image-to-image translation models, whcih were tested for RGB to NIR image generation. The models are Pix2Pix, Pix2PixHD, CycleGAN and PointWise.

RGB2NIR_Experimental This repository contains several image-to-image translation models, whcih were tested for RGB to NIR image generation. The models

null 5 Jan 4, 2023
Fast image augmentation library and easy to use wrapper around other libraries. Documentation: https://albumentations.ai/docs/ Paper about library: https://www.mdpi.com/2078-2489/11/2/125

Albumentations Albumentations is a Python library for image augmentation. Image augmentation is used in deep learning and computer vision tasks to inc

null 11.4k Jan 9, 2023
Simple is not Easy: A Simple Strong Baseline for TextVQA and TextCaps[AAAI2021]

Simple is not Easy: A Simple Strong Baseline for TextVQA and TextCaps Here is the code for ssbassline model. We also provide OCR results/features/mode

ZephyrZhuQi 51 Nov 18, 2022
A 1.3B text-to-image generation model trained on 14 million image-text pairs

minDALL-E on Conceptual Captions minDALL-E, named after minGPT, is a 1.3B text-to-image generation model trained on 14 million image-text pairs for no

Kakao Brain 604 Dec 14, 2022
Source code for the GPT-2 story generation models in the EMNLP 2020 paper "STORIUM: A Dataset and Evaluation Platform for Human-in-the-Loop Story Generation"

Storium GPT-2 Models This is the official repository for the GPT-2 models described in the EMNLP 2020 paper [STORIUM: A Dataset and Evaluation Platfor

Nader Akoury 27 Dec 20, 2022
A weakly-supervised scene graph generation codebase. The implementation of our CVPR2021 paper ``Linguistic Structures as Weak Supervision for Visual Scene Graph Generation''

README.md shall be finished soon. WSSGG 0 Overview 1 Installation 1.1 Faster-RCNN 1.2 Language Parser 1.3 GloVe Embeddings 2 Settings 2.1 VG-GT-Graph

Keren Ye 35 Nov 20, 2022
StudioGAN is a Pytorch library providing implementations of representative Generative Adversarial Networks (GANs) for conditional/unconditional image generation.

StudioGAN is a Pytorch library providing implementations of representative Generative Adversarial Networks (GANs) for conditional/unconditional image generation.

null 3k Jan 8, 2023
Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)

Deep Daze mist over green hills shattered plates on the grass cosmic love and attention a time traveler in the crowd life during the plague meditative

Phil Wang 4.4k Jan 3, 2023