GithubHelp home page GithubHelp logo

pytorch_realtime_multi-person_pose_estimation's People

Contributors

clementpinard avatar daheer avatar shaileshsridhar2403 avatar simonhfls avatar tensorboy avatar

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  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

pytorch_realtime_multi-person_pose_estimation's Issues

training code does not work

In function "train" of TODO-train_from_scratch.py, the line "target = target.cuda(async=True)" causes an error "AttributeError: 'dict' object has no attribute 'cuda'". How could I fix it?

opencv error

train dataset len: 121522
val dataset len: 4873
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
Traceback (most recent call last):
File "train_ShuffleNetV2.py", line 300, in
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
train_loss = train(train_data, model, optimizer, epoch)
File "train_ShuffleNetV2.py", line 145, in train
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
for i, (img, heatmap_target, heat_mask, paf_target, paf_mask) in enumerate(train_loader):
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
File "/home/wangmeng/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 336, in next
return self._process_next_batch(batch)
File "/home/wangmeng/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch
OpenCV(3.4.1) Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp, line 4044
raise batch.exc_type(batch.exc_msg)
cv2.error: Traceback (most recent call last):
File "/home/wangmeng/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/wangmeng/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/wangmeng/pytorch_Realtime_Multi-Person_Pose_Estimation/training/datasets/coco_data/COCO_data_pipeline.py", line 238, in getitem
meta_data, img, mask_miss, self.params_transform)
File "/home/wangmeng/pytorch_Realtime_Multi-Person_Pose_Estimation/training/datasets/coco_data/ImageAugmentation.py", line 39, in aug_scale
interpolation=cv2.INTER_CUBIC)
cv2.error: OpenCV(3.4.1) /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/imgproc/src/resize.cpp:4044: error: (-215) ssize.width > 0 && ssize.height > 0 in function resize

test without CUDA

Hi!

I was trying to run the Python demo picture_demo.py however I keep getting error:
File "/usr/local/lib/python3.6/site-packages/torch/cuda/__init__.py", line 51, in _check_driver raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled

Is it possible to run it without CUDA ?

Thanks!

(I installed Pytorch from http://pytorch.org for OS X)

why do you usr cross entropy loss?

I noticed in the paper and original repo, L2 loss function is used.
In your implementation:

# define loss function (criterion) and pptimizer
criterion = nn.CrossEntropyLoss().cuda()

cross entropy loss is used.

does it really work?

How to tell points from points?

Hello. I use the picture_demo.py to generate the pose coordinates for a person. The detected joint coordinates are stored in array all_peaks. However, how can I tell which point, for example, belongs to the arm, and which belongs to the leg?

getting some syntax error running on OS X

Christians-iMac:pytorch_Realtime_Multi-Person_Pose_Estimation-master sugarbank$ python picture_demo.py
File "picture_demo.py", line 162
print 'time is %.5f'%(toc-tic)

Question about Training Details

Hi, Thanks for you good work!
Now I'm rewriting this project by keras
But I have some question about training
When I generate the ground truth
the confidence map's size is 46 * 46
But only a few points set to values > 0 (because only the points near key point is positive)
and all other points set to 0
Then when I try to training the network
I found it tends to predict all the points to be zero
and even so the loss is low because we use squared error
So is there any advice for training the network to avoid this problem?

Training procedure is unclear

Dear tensorboy,

I'm having a hard time figuring out the training steps in the original repository. I see that you managed to port it to pytorch and I'm also trying to reimplement the pose machine in python using tensorflow.

At the moment I'm not interested in PAF estimation, I only want to use the heatmaps but I'm just unable to figure out the preprocessing and the training steps. I'd be glad if you could aid me in any direction.

I managed to generate the masks for the images, also the ground truth heatmaps (both are the sizes of the original image from MSCOCO). I'm wondering how did they or how did you feed the images to the net, because the training images are not the same in size and I can't find the process that does this (correct me if I'm wrong, but the network uses one fix input size).

Also it is unclear to me whether the stage's output is resized to the original size or the groundtruth heatmaps and the masks are scaled down to match the output.

Thank you in advance!

More instructions to train the model

Thanks for your work ! Your test model runs very well, but I have some troubles when I train the model in my dataset, So can you share your way to train the model or you can share your train codes for your convenient.Thanks a lot !!!

Crash in 'python convert.py'

model6_2.6.bias
model6_2.8.weight
model6_2.8.bias
model6_2.10.weight
model6_2.10.bias
model6_2.12.weight
model6_2.12.bias
src/tcmalloc.cc:283] Attempt to free invalid pointer 0x7fc0c689ed90
[1] 969 abort python convert.py

ImportError: dlopen: cannot load any more object with static TLS

My pytorch version is 0.2.0_3. I have come across the problem:
Traceback (most recent call last):
File "convert.py", line 11, in
import caffe
File "/home/sensenets/anaconda2/lib/python2.7/site-packages/caffe/init.py", line 1, in
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
File "/home/sensenets/anaconda2/lib/python2.7/site-packages/caffe/pycaffe.py", line 13, in
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: dlopen: cannot load any more object with static TLS
could you kindly help?

CPU mode

Hi is it possible to run in CPU mode only?

lr_scheduler has to be ReduceLROnPlateau?

I used stepLR instead of ReduceLROnPlateau, but only got mAP 43% with scale 1 on 1160 images of coco val2014. However, your released model achieves 52.3% .
I observed the last heatmap loss, mine stays at 24, but yours at 19. Does lr_scheduler really infulence so much?

Which version of pytorch and opencv?

     Thanks for your work. I  want to ask that which version of pytorch and opencv did you use? Can I run the demo  on windows or ubuntu  by using pytorch-cpu? 

Compatibility with python 3

I have tried to make the code run-able in python 3.6.

  • Use print()
  • Change .iteritems() with .items()
    However I got the last error
Traceback (most recent call last):
  File "convert.py", line 73, in <module>
    models[k] = make_layers(v)
  File "convert.py", line 53, in make_layers
    k = one_[0]
TypeError: 'dict_keys' object does not support indexing

How to solve this?

model picture

hi,
could you tell how you draw the model picture? handcraft or some tools?
it seems complex to draw,

thx,

FPS Question on GPU Mode

Running thru ur web.demo code, the fps is about 1.2(Image size = 960x540).
Is there any way speed up the system?
Looking forward to your response!!!!!!

Hungarian algorithm for part association

Hi,
I read in the paper of part affinity that Hungarian algorithm is used for association of limbs when multiple contenders exist for a limb but in the code normal greedy association is done by eliminating the chances of multiple associations
`if(i not in connection[:,3] and j not in connection[:,4]):`` Line 306 in picture_demo.py

Explanation in the paper is different.Any insights?

How can I store heatmaps efficiently to fit into memory

Hi @tensorboy,

I would like to store heatmaps representation for my dataset. l have about 50,000 images of dimension (320,240,3).

So for each image of (320,240,3) l have its associated heatmaps of (320,240,19). However when it comes to store heatmaps of all images , l get a tensor of (50,000,320,240,19) which doesn't fit to memory.

What l have tried ?
I tried to store only the 5% highest values for each human key point heatmap. To do so, l need the [(x,y) coordinates, value , key point id]. Using this representation , l find that each heatmaps image representation takes about 8 Mo. It's still heavy (numpy load takes about 6 minutes to load 3000 images heatmaps ) and l need to load at once the whole heatmaps representation of my dataset.

Any cue to circumvent that ?

Thank you a lot

ZeroDivisionError: float division by zero

Hi,

I tried the code but I got different values in torch than in the matlab version. Also, for some images I get:

ZeroDivisionError Traceback (most recent call last)
in ()
20
21 score_midpts = np.multiply(vec_x, vec[0]) + np.multiply(vec_y, vec[1])
---> 22 score_with_dist_prior = sum(score_midpts)/len(score_midpts) + min(0.5*oriImg.shape[0]/norm-1, 0)
23 criterion1 = len(np.nonzero(score_midpts > param_['thre2'])[0]) > 0.8 * len(score_midpts)
24 criterion2 = score_with_dist_prior > 0

ZeroDivisionError: float division by zero

Another problem is that you get parts from a different person in the list of parts of a subject. I also think that if the algorithm is unable to find a joint for a subject to put 0 (as in Matlab), because I think that this is the cause of the second problem. Otherwise we are unable to determine automatically to whom the detected parts belong.

I really appreciate your work!
Thank you!

evaluation.py error

python evaluation.py using pose_model.pth(via rtpose original link https://www.dropbox.com/s/ae071mfm2qoyc8v/pose_model.pth?dl=0)

Traceback (most recent call last):
File "evaluation.py", line 34, in
model=model, preprocess='vgg')
File "../evaluate/coco_eval.py", line 311, in run_eval
return eval_coco(outputs=outputs, dataDir=anno_dir, imgIds=img_ids)
File "../evaluate/coco_eval.py", line 50, in eval_coco
json.dump(outputs, f)
File "/home/anaconda3/envs/py35/lib/python3.5/json/init.py", line 178, in dump
for chunk in iterable:
File "/home/anaconda3/envs/py35/lib/python3.5/json/encoder.py", line 427, in _iterencode
yield from _iterencode_list(o, _current_indent_level)
File "/home/anaconda3/envs/py35/lib/python3.5/json/encoder.py", line 324, in _iterencode_list
yield from chunks
File "/home/anaconda3/envs/py35/lib/python3.5/json/encoder.py", line 403, in _iterencode_dict
yield from chunks
File "/home/anaconda3/envs/py35/lib/python3.5/json/encoder.py", line 436, in _iterencode
o = _default(o)
File "/home/anaconda3/envs/py35/lib/python3.5/json/encoder.py", line 179, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: 192 is not JSON serializable

What is this error?

Download converted model

Hi @tensorboy,

Could you upload the converted pytorch model to the website of "www.pan.baidu.com" or some other places?

I cannot visit the web of DropBox on my internet.

Thank you!

YIng Wong

Resource Requirements

How much hardware resources will we be requiring to run the picture/web demo? I'm attempting to run them on the JetsonTX1 (running at max turbo mode) but it could be a very far stretch as the output I get from the terminal for the picture demo is
time is 0.68739
Killed
indicating perhaps I have crossed the maximum resource threshold. Slight probing showed it crashed when running output1,output2 = model(feed)

Why heatmap doesn't sum to 1 ?

Hi @tensorboy,

I'm wondering why heatmap doesn't sum to 1 since each pixel of heatmap represents the probability that a key point is encoded in that location.

Since we have 18 key points (each key point with its heatmap), where the highest value in a a given heatmap is the probability of having that key point in that location. However when l sum a given heatmap, it doesn't sum to 1, it exceeds drastically one. I get 450, 534.3 ...

Why ?
Am l missing something ?

Thank you for your answer

picture_demo.py line 304 missing a case, with correction attached

I think it should be:
if found == 1:
j = subset_idx[0]
if (subset[j][indexB] != partBs[i]):
subset[j][indexB] = partBs[i]
subset[j][-1] += 1
subset[j][-2] += candidate[partBs[i].astype(int), 2] + connection_all[k][i][2]
if (subset[j][indexA] != partAs[i]):
subset[j][indexA] = partAs[i]
subset[j][-1] += 1
subset[j][-2] += candidate[partAs[i].astype(int), 2] + connection_all[k][i][2]

Otherwise, in some cases different subsets won't merge correctly. Thank you!

How‘s CPM refinement working?

Table 4 in papar mentioned that CPM refinement can provide more than 2.6% AP increase. Is it a post-processing method? Has it been added to the existed code? Thanks for answer.

How to generate mask images?

I want to train with train2017 and I've tried using coco.annToMask() to get mask but the output are different from yours.
How can I get mask for train2017?

Did TODO-train_from_scratch.py work?

Thanks a lot for author's work.
but I see the author say he did not implement train code from issue #10
so did anyone use this code to train own model successfully?

thank your code and how to train?

Hi @tensorboy,
your paper and code helps me a lot !thank you !

Could you please give me an guidance about how to train the model on pytorch ?

I did this and the result is here
Training

cd training; bash getData.sh to obtain the COCO images in dataset/COCO/images/, keypoints annotations in dataset/COCO/annotations/ and COCO official toolbox in `dataset/COCO/coco/ .
cd training/dataset/COCO/coco/PythonAPI; sudo python setup.py install to install pycocotools

sun@sunwin:~/0newcodedown/pytorchRealtime/training/dataset/COCO/coco/PythonAPI$ sudo python setup.py install
[sudo] sun 的密码:
Compiling pycocotools/_mask.pyx because it changed.
[1/1] Cythonizing pycocotools/_mask.pyx
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/pycocotools
copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-2.7/pycocotools
copying pycocotools/coco.py -> build/lib.linux-x86_64-2.7/pycocotools
copying pycocotools/init.py -> build/lib.linux-x86_64-2.7/pycocotools
copying pycocotools/mask.py -> build/lib.linux-x86_64-2.7/pycocotools
running build_ext
building 'pycocotools._mask' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/pycocotools
creating build/common
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I../common -I/usr/include/python2.7 -c pycocotools/_mask.c -o build/temp.linux-x86_64-2.7/pycocotools/_mask.o -Wno-cpp -Wno-unused-function -std=c99
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I../common -I/usr/include/python2.7 -c ../common/maskApi.c -o build/temp.linux-x86_64-2.7/../common/maskApi.o -Wno-cpp -Wno-unused-function -std=c99
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/pycocotools/_mask.o build/temp.linux-x86_64-2.7/../common/maskApi.o -o build/lib.linux-x86_64-2.7/pycocotools/_mask.so
running install_lib
creating /usr/local/lib/python2.7/dist-packages/pycocotools
copying build/lib.linux-x86_64-2.7/pycocotools/cocoeval.py -> /usr/local/lib/python2.7/dist-packages/pycocotools
copying build/lib.linux-x86_64-2.7/pycocotools/_mask.so -> /usr/local/lib/python2.7/dist-packages/pycocotools
copying build/lib.linux-x86_64-2.7/pycocotools/coco.py -> /usr/local/lib/python2.7/dist-packages/pycocotools
copying build/lib.linux-x86_64-2.7/pycocotools/init.py -> /usr/local/lib/python2.7/dist-packages/pycocotools
copying build/lib.linux-x86_64-2.7/pycocotools/mask.py -> /usr/local/lib/python2.7/dist-packages/pycocotools
byte-compiling /usr/local/lib/python2.7/dist-packages/pycocotools/cocoeval.py to cocoeval.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/pycocotools/coco.py to coco.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/pycocotools/init.py to init.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/pycocotools/mask.py to mask.pyc
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/pycocotools-2.0.egg-info

and what to do next ? I want to train the model on my own laptop . but you caffe version ZheC/Realtime_Multi-Person_Pose_Estimation#70 just cant work .
thanks you a lot!

Where is the evaluation module??

When testing web_demo.py

"from evaluation.coco_eval import get_multiplier, get_outputs"
ImportError: No module named 'evaluation'

Can anyone tell me where to get the evaluation module??

License?

Thank you for sharing your code. Apologies if I missed it, but I don't see a license specified. Could you please let us know what license this is shared under, and if it can be used commercially?

AssertionError: Torch not compiled with CUDA enabled

Hi I just want to run in cpu mode.Is it possible to set Cpu flags and avoid this error?
Tried setting Cpu mode from your feedback in the last issue but was unable to do so...Is it possible to add a flag for CPU mode?

Christians-iMac:pytorch_Realtime_Multi-Person_Pose_Estimation-master sugarbank$ python picture_demo.py
Traceback (most recent call last):
File "picture_demo.py", line 153, in
imageToTest = Variable(T.transpose(T.transpose(T.unsqueeze(torch.from_numpy(oriImg).float(),0),2,3),1,2),volatile=True).cuda()
File "/usr/local/lib/python2.7/site-packages/torch/autograd/variable.py", line 243, in cuda
return CudaTransfer(device_id, async)(self)
File "/usr/local/lib/python2.7/site-packages/torch/autograd/_functions/tensor.py", line 160, in forward
return i.cuda(async=self.async)
File "/usr/local/lib/python2.7/site-packages/torch/_utils.py", line 65, in cuda
return new_type(self.size()).copy
(self, async)
File "/usr/local/lib/python2.7/site-packages/torch/cuda/init.py", line 272, in new
_lazy_init()
File "/usr/local/lib/python2.7/site-packages/torch/cuda/init.py", line 84, in _lazy_init
_check_driver()
File "/usr/local/lib/python2.7/site-packages/torch/cuda/init.py", line 51, in _check_driver
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
Christians-iMac:pytorch_Realtime_Multi-Person_Pose_Estimation-master sugarbank$

How can l get the order of human key points and their associated feature vectors ?

Hello @tensorboy,

Let me first thank you for your clean code.

I have a question related to the order of key points.

  1. Since we have 18 human key points, l would like to know which key point belong to tendon, knee, arm, leg ... ?

  2. Is there a way to get a feature vector describing each human key point ?

  3. What does out6= torch.cat([out5_1,out5_2,out1],1) represent ?
    It is of dim(185,x,y). What is 185 ?
    https://github.com/tensorboy/pytorch_Realtime_Multi-Person_Pose_Estimation/blob/master/picture_demo.py#L132

Thank you for you answer

How to seperate the skeletons of each person?

@tensorboy @lyxok1
Hi, I just ran the picture_demo using the default image ski.jpg provided in your repo and found something wrong: As you can see, there are only 5 people in the image, so I'm expecting the estimated poses to be stored in a 18 * 5 * 4 matrix. However, this is what I've got in all_peaks:

image

I have two questions:

  1. Why does line 04 and line 12 has 6 elements? It seems that the estimator has detected 6 entities out of an image that only contains 5 people. What do you make of that?

  2. I don't know how to assign keypoints of each joint to the corresponding persons. For example, line 17 only contains 4 keypoints, should I assign them to person 0,1,2,3 or 0,1,2,4, ... or 1,2,3,4? Can you tell me in which variable is the assignment information stored?

Thanks for your answer!

train error

python train_ShuffleNetV2.py --json_path training/dataset/COCO.json --data_dir training/dataset/COCO/images --mask_dir training/dataset/COCO

Loading dataset...
Traceback (most recent call last):
File "train_ShuffleNetV2.py", line 266, in
shuffle=True, training=True, num_workers=16)
TypeError: get_loader() missing 1 required positional argument: 'params_transform'

train from scratch----getData.sh

It seems that http://msvocds.blob.core.windows.net/annotations-1-0-3/person_keypoints_trainval2014.zip in your shell script doesn't contain data files for training. Would you mind updating the script?
By the way, I'm working on the training process of  Convolutional Pose Machines. Line 266 of TODO-train_from_scratch.py indicates that loss of the network is computed via pose's heatmap and person_keypoints_val2014.json contains the heatmap infomation. Is it proper for me to think this way? If it's right, how to judge the heatmap's radius for each keypoint?
Thank you.

train_VGG19.py error

python train_VGG19.py --json_path training/dataset/COCO.json --data_dir training/dataset/COCO/images --mask_dir training/dataset/COCO

Loading dataset...
train dataset len: 121522
val dataset len: 4873
Bulding VGG19
load imagenet pretrained model: ./network/weight/
OpenCV Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /install_opencv/opencv-3.3.0/modules/imgproc/src/imgwarp.cpp, line 3483
OpenCV Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /install_opencv/opencv-3.3.0/modules/imgproc/src/imgwarp.cpp, line 3483
OpenCV Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /install_opencv/opencv-3.3.0/modules/imgproc/src/imgwarp.cpp, line 3483
OpenCV Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /install_opencv/opencv-3.3.0/modules/imgproc/src/imgwarp.cpp, line 3483
Traceback (most recent call last):
File "train_VGG19.py", line 310, in
train_loss = train(train_data, model, optimizer, epoch)
File "train_VGG19.py", line 157, in train
for i, (img, heatmap_target, heat_mask, paf_target, paf_mask) in enumerate(train_loader):
File "anaconda3/envs/py35/lib/python3.5/site-packages/torch/utils/data/dataloader.py", line 286, in next
return self._process_next_batch(batch)
File "anaconda3/envs/py35/lib/python3.5/site-packages/torch/utils/data/dataloader.py", line 307, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
cv2.error: Traceback (most recent call last):
File "anaconda3/envs/py35/lib/python3.5/site-packages/torch/utils/data/dataloader.py", line 57, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "anaconda3/envs/py35/lib/python3.5/site-packages/torch/utils/data/dataloader.py", line 57, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "pytorch_Realtime_Multi-Person_Pose_Estimation/training/datasets/coco_data/COCO_data_pipeline.py", line 238, in getitem
meta_data, img, mask_miss, self.params_transform)
File "pytorch_Realtime_Multi-Person_Pose_Estimation/training/datasets/coco_data/ImageAugmentation.py", line 42, in aug_scale
fy=scale, interpolation=cv2.INTER_CUBIC)
cv2.error: /install_opencv/opencv-3.3.0/modules/imgproc/src/imgwarp.cpp:3483: error: (-215) ssize.width > 0 && ssize.height > 0 in function resize

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.