zllrunning / face-makeup.pytorch Goto Github PK
View Code? Open in Web Editor NEWLip and hair color editor using face parsing maps.
License: MIT License
Lip and hair color editor using face parsing maps.
License: MIT License
hey,
current code throws an error for the images which height and width are not equal,
the reason is that the mask (evaluate return value) has a transposed dimensions.
to fix that change the line 79 of makeup.py to:
parsing = cv2.resize(parsing, image.shape[0:2][::-1], interpolation=cv2.INTER_NEAREST)
also , multichannel=True
in line 17 of makeup.py must be removed.
hope this helps!
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.
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
What is color code to get this hair color to black? i have tried different color codes but not able to change the hair color to black
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 ?
I am getting assertion error "Torch version is not compiled for CUDA support" when try to run on macosx Mojave.
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?
Where can we find the documentation or an overview of the processes involved in hair masking?
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
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.
HI I have changed the line in makeup.py but color is not chaning when runnin the program the default color mode is blue and when I change the parameters it is not making any change colors = [[255, 0, 0], [20, 70, 180], [20, 70, 180]]
please any help on the issue or guidance on how to change it
Please use pictures with the same length and width to participate in the test.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.