GithubHelp home page GithubHelp logo

zllrunning / face-makeup.pytorch Goto Github PK

View Code? Open in Web Editor NEW
472.0 10.0 149.0 50.82 MB

Lip and hair color editor using face parsing maps.

License: MIT License

Python 100.00%
face-parsing makeup lipstick semantic-segmentation

face-makeup.pytorch's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

face-makeup.pytorch's Issues

Port to Mobile

I'm trying to port this trained model to ios but always fail ( output model size is very large and dont know how to use it ) . Can you help to convert it to ios model ?

cannot connect to X server

I am getting above error on running !python makeup.py --img-path imgs/116.jpg command. I have followed all the instructions and am unable to detect the cause of the error. Can someone please help me out here.

Documentation

Where can we find the documentation or an overview of the processes involved in hair masking?

Error IndexError: boolean index did not match indexed array along dimension 0; dimension is 780 but corresponding boolean dimension is 799

Hi,

Getting the following error. Is this due to size mismatch?

Downloading: "https://download.pytorch.org/models/resnet18-5c106cde.pth" to /root/.cache/torch/hub/checkpoints/resnet18-5c106cde.pth
100% 44.7M/44.7M [00:00<00:00, 307MB/s]
Traceback (most recent call last):
File "makeup.py", line 86, in
image = hair(image, parsing, part, color)
File "makeup.py", line 54, in hair
changed[parsing != part] = image[parsing != part]
IndexError: boolean index did not match indexed array along dimension 0; dimension is 780 but corresponding boolean dimension is 799

IndexError: boolean index did not match indexed array along dimension 0

I have issue about make up other image.

Traceback (most recent call last):
  File "makeup.py", line 173, in <module>
    image = hair(image, parsing, part, color)
  File "makeup.py", line 63, in hair
    changed[parsing != part] = image[parsing != part]
IndexError: boolean index did not match indexed array along dimension 0; dimension is 1160 but corresponding boolean dimension is 2000

How to resolve it?

can't test on image other than size 512*512

I'm getting this error

changed[parsing != part] = image[parsing != part] IndexError: boolean index did not match indexed array along dimension 0; dimension is 1600 but corresponding boolean dimension is 1062

RuntimeError: Attempted to set the storage of a tensor on device "cuda:0" to a storage on different device "cpu".

Right now the Pytorch with CUDA 10.2 is not available for the Windows OS.
When I am running this project with the CUDA 11.3 for the Windows OS, then I am getting the following ERRORs.

  File "F:\Restart_08122021\my_project\module_x\test.py", line 51, in evaluate
    net = BiSeNet(n_classes=n_classes)
  File "F:\Restart_08122021\my_project\module_x\model.py", line 235, in __init__
    self.cp = ContextPath()
  File "F:\Restart_08122021\my_project\module_x\model.py", line 97, in __init__
    self.resnet = Resnet18()
  File "F:\Restart_08122021\my_project\module_x\resnet.py", line 69, in __init__
    self.init_weight()
  File "F:\Restart_08122021\my_project\module_x\resnet.py", line 83, in init_weight
    state_dict = modelzoo.load_url(resnet18_url)
  File "C:\ProgramData\Anaconda3\envs\my_project\lib\site-packages\torch\hub.py", line 595, in load_state_dict_from_url
    return torch.load(cached_file, map_location=map_location)
  File "C:\ProgramData\Anaconda3\envs\my_project\lib\site-packages\torch\serialization.py", line 713, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "C:\ProgramData\Anaconda3\envs\my_project\lib\site-packages\torch\serialization.py", line 905, in _legacy_load
    return legacy_load(f)
  File "C:\ProgramData\Anaconda3\envs\my_project\lib\site-packages\torch\serialization.py", line 841, in legacy_load
    tensor = torch.tensor([], dtype=storage.dtype).set_(
  RuntimeError: Attempted to set the storage of a tensor on device "cuda:0" to a storage on different device "cpu".  This is no longer allowed; the devices must match.

Please help me in solving this error.

size error

Please use pictures with the same length and width to participate in the test.

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.