Comments (4)
Hi Jerry, thanks for your question.
Regarding a missing stats file, check out this part of the Readme. I forgot to upload that file with the dataset, and haven't gotten around to reuploading the whole thing to add the single file yet.
For your question about what clothing gets transferred, at the moment, by default it does a one-to-one mapping based on the image index i (sorted alphabetically). So the model will use the clothes_i (Source) to transfer onto body_i (Target). As long as the number of files in Source >= number of files in Target, it should run fine.
In the first sanity check in the Readme, we use this:
python inference.py --checkpoint checkpoints/deep_fashion \
--dataroot data/deep_fashion \
--shuffle_data True
to perform inference on the DeepFashion dataset itself. The default one-to-one mapping would mean we'd transfer the clothing onto the same body it belonged to originally. This doesn't make much sense, so we use the --shuffle_data
option so that clothes get transferred to random bodies.
For the inference command you mentioned,
python inference.py --checkpoint checkpoints/deep_fashion \
--cloth_dir [SOURCE] --texture_dir [SOURCE] --body_dir [TARGET]
this is to control which cloth (Source) we want to transfer to what body (Target).
The first important thing is that if you use the --texture_dir
, --cloth_dir
, --body_dir
options individually, they should point to dataroot/texture
, dataroot/cloth
, dataroot/body/
folders respectively. They do not each point to just dataroot
.
The reason these inputs are folders instead of single images is in case you want to process a video. You would put all the frames from a video in the same folder. If you want to transfer a single image, then just put a single image in each folder.
Hope that helps a bit. I know it's bit complicated, please let me know if you have more questions.
from swapnet.
Another important thing to note about SwapNet's clothing transfer - it's not exactly "transfer" (at least I don't think so). It's more like: learn to repose the source into any arbitrary pose; during inference, just repose the clothes to match that of the target body. The identity of the target user is not preserved at all, and SwapNet resorts to copying over the face pixels from the target to "preserve" identity (I haven't implemented this part yet, see #6). There has definitely been better clothing transfer works published since.
from swapnet.
I see, this makes a lot of sense (I was wondering why the target body directory didn't need a textures directory too - I guess it just doesn't use them if the target isn't preserved since it just needs pose info).
I got the basic inference to work well, but would you know of any open-source code that I can build on for those better transfer networks? Would love to hop on a call to talk more about the topic as well since I'm relatively new to this area of research - you can reach me at [email protected]. Thanks!
from swapnet.
Hi Jerry, we can connect on LinkedIn and set something up. I'm https://www.linkedin.com/in/ajong/. Cheers.
from swapnet.
Related Issues (20)
- Make preprocessing easier
- Labels are off by 1, hats are missing HOT 1
- SwapNet Checkpoint Models for Inference
- Colab notebook
- Rehaul the code to use PyTorch Lightning
- ModuleNotFoundError: No module named 'model' HOT 3
- Is it different from MGN? If so, how? HOT 1
- Training Warp stage stops at epoch 3 HOT 3
- inference img HOT 1
- Is there any pre-trained model that can be used in handy? HOT 1
- How to test? HOT 1
- Testing error HOT 2
- Without training trying to test
- Error(s) in loading state_dict() for WrapModule HOT 2
- RuntimeError when training HOT 2
- KeyError: Caught KeyError in DataLoader worker process 0. HOT 6
- Help wanted !! KeyError: Caught KeyError in DataLoader worker process 0. HOT 1
- seaborn dependency not included in environment.yml
- loss.py needs small changes.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swapnet.