charleshhy / one-shot-human-parsing Goto Github PK
View Code? Open in Web Editor NEW[AAAI 2021] (oral) Progressive One-shot Human Parsing, [TPAMI 2023] End-to-end One-shot Human Parsing
License: Apache License 2.0
[AAAI 2021] (oral) Progressive One-shot Human Parsing, [TPAMI 2023] End-to-end One-shot Human Parsing
License: Apache License 2.0
When I am running the project from the following command:
bash scripts/evaluate_atr_kwf1.sh
I am getting the following error:
Traceback (most recent call last):
File "./exp/train.py", line 14, in <module>
from torchvision import transforms
File "/home/mayank/anaconda3/envs/iniy_oneshothumanparsing_041221/lib/python3.7/site-packages/torchvision/__init__.py", line 1, in <module>
from torchvision import models
File "/home/mayank/anaconda3/envs/iniy_oneshothumanparsing_041221/lib/python3.7/site-packages/torchvision/models/__init__.py", line 11, in <module>
from . import detection
File "/home/mayank/anaconda3/envs/iniy_oneshothumanparsing_041221/lib/python3.7/site-packages/torchvision/models/detection/__init__.py", line 1, in <module>
from .faster_rcnn import *
File "/home/mayank/anaconda3/envs/iniy_oneshothumanparsing_041221/lib/python3.7/site-packages/torchvision/models/detection/faster_rcnn.py", line 7, in <module>
from torchvision.ops import misc as misc_nn_ops
File "/home/mayank/anaconda3/envs/iniy_oneshothumanparsing_041221/lib/python3.7/site-packages/torchvision/ops/__init__.py", line 1, in <module>
from .boxes import nms, box_iou
File "/home/mayank/anaconda3/envs/iniy_oneshothumanparsing_041221/lib/python3.7/site-packages/torchvision/ops/boxes.py", line 2, in <module>
from torchvision import _C
ImportError: libcudart.so.9.0: cannot open shared object file: No such file or directory
This is the structure of the project:
.
├── data
│ ├── datasets
│ │ ├── ATR_OS
│ │ │ ├── list
│ │ │ │ ├── meta_test_id.txt
│ │ │ │ └── meta_train_id.txt
│ │ │ └── support
│ │ │ ├── meta_test_atr_supports.pkl
│ │ │ └── meta_train_atr_supports.pkl
│ │ ├── CIHP_OS
│ │ │ └── list
│ │ │ ├── meta_test_id.txt
│ │ │ └── meta_train_id.txt
│ │ └── LIP_OS
│ │ └── list
│ │ ├── meta_test_id.txt
│ │ └── meta_train_id.txt
│ └── pretrained_model
│ └── deeplab_v3plus_v3.pth
├── dataloaders
│ ├── mypath_atr.py
│ ├── mypath_mhp.py
│ ├── mypath.py
│ ├── oshp_loader.py
│ └── transforms.py
├── exp
│ ├── __init__.py
│ └── train.py
├── how_to_install.txt
├── imgs
│ ├── Figure1.jpg
│ └── Figure1.pdf
├── LICENSE
├── networks
│ ├── deeplab_xception_synBN.py
│ ├── eopnet.py
│ ├── __init__.py
│ └── popnet.py
├── README.md
├── requirements.txt
├── scripts
│ ├── atr_eop_1wf1.sh
│ ├── atr_eop_1wf2.sh
│ ├── atr_eop_kwf1.sh
│ ├── atr_eop_kwf2.sh
│ ├── cihp_eop_kwf1.sh
│ ├── cihp_eop_kwf2.sh
│ ├── evaluate_atr_1wf1.sh
│ ├── evaluate_atr_kwf1.sh
│ ├── lip_etop_kw_f1.sh
│ └── lip_etop_kw_f2.sh
├── sync_batchnorm
│ ├── batchnorm.py
│ ├── comm.py
│ ├── __init__.py
│ ├── replicate.py
│ └── unittest.py
└── utils
├── __init__.py
├── metric.py
├── sampler.py
├── test_human.py
└── util.py
Please help me.
Hello, I am running the project recently. I hope you can provide it. Please pass the application. My account number is [email protected] Thank you very much.
I am not getting how to do inference using this code? I see no example code, no script regarding inference. It makes me think it is only possible to do training with this code?
I found this exact same issue that got an answer, unfortunately the answer do not actually answers the questions, as it redirects to a util function that saves the image as a file and suppose you already did inference and got the prediction.
Can you please provide an example code to do inference?
If I have an image "input/person.jpg", what do I do to get the human parse as a result?
Thank you,
I successfully reproduced your code on the atr dataset, but the effect did not reach the effect mentioned in your article, as shown in the figure below, epoch=50, batch=2, gpus=2, because batch=2 will report an error, I made a simple modification to the code, what else can I do to achieve the effect of your article. Also, which part of the code output should I look at, agm or npm, where mean miou is the human miou in the paper?
Looking forward to your reply!
Hi,
first of all, thanks a lot for sharing your work. Really impressive!
I have 2 questions please:
query
and support
images/masks are needed. For inference, what we want though, is to be able to submit a single (or batch) picture of a person and have the mask as output (image IN -> mask OUT). Is this supported?Thanks and have a great day
bash scripts/evaluate_atr_kwf1.sh
the content of evaluate_atr_kwf1.sh:
export PYTHONPATH="${PYTHONPATH}:$(pwd)"
python ./exp/train.py
--batch 2
--gpus 1
--resume_model ./data/pretrained_model/atr_kwf1.pth
--resume_epoch 39
--lr 0.001
--numworker 6
--testInterval 10
--hidden_layers 256
--epochs 50
--dataset atr
--test_classes 18
--fold 1
--way 'kway'
--structure kway_oshp
--size 512
--prototype_warmup 25
--fg_weight 1.0
--contrast_weight 1.0
--testing_screening
--feature_lvl mid
--temperature 0.1
--validate
result:
=> Structure:kway_oshp, dataset:atr, way:kway, fold:1
=> Saving log to: /home/fuzhi-dlj/workspace_big_bang/workspace/infant/human_parse/One-shot-Human-Parsing/exp/run_cihp/run_6
Constructing DeepLabv3+ model...
Output stride: 16
Number of Input Channels: 3
=> No model load!
opts.resume_model ./data/pretrained_model/atr_kwf1.pth
Traceback (most recent call last):
File "./exp/train.py", line 560, in
main(opts)
File "./exp/train.py", line 381, in main
net_.load_state_dict(x)
File "/home/fuzhi-dlj/workspace/conda_list/pyt1736/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1052, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for EOPNet_kway:
size mismatch for prototype: copying a param with shape torch.Size([20, 256]) from checkpoint, the shape in current model is torch.Size([18, 256]).
Hello
Thanks for the awesome work
In the README, there are link to datasets that can be downloaded via google drive, can you specify what are the licenses for using these datasets
b.r
这数据集是你们自己创建并标注的吗?
Can you provide a simply script to get the visualization result? thanks you!
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.