Giter Site home page Giter Site logo

mks0601 / posefix_release Goto Github PK

View Code? Open in Web Editor NEW
327.0 11.0 64.0 2.58 MB

Official TensorFlow implementation of "PoseFix: Model-agnostic General Human Pose Refinement Network", CVPR 2019

License: MIT License

Python 92.57% Makefile 0.06% C++ 0.08% Cuda 2.76% Cython 4.53%
human-pose-estimation tensorflow cvpr2019 deep-learning computer-vision mscoco-keypoint posetrack mpii-dataset

posefix_release's Introduction

PoseFix: Model-agnostic General Human Pose Refinement Network

PWC

PoseFix makes pose result of any methods better from a single '.json' file!

News

We achieved top performance by refining the state-of-the-art (HRNet, CVPR 2019). You can always make your results better!

Introduction

This repo is official TensorFlow implementation of PoseFix: Model-agnostic General Human Pose Refinement Network (CVPR 2019) for model-agnostic human pose refinement from a single RGB image. What this repo provides:

Dependencies

This code is tested under Ubuntu 16.04, CUDA 9.0, cuDNN 7.1 environment with two NVIDIA 1080Ti GPUs.

Python 3.6.5 version with Anaconda 3 is used for development.

Directory

Root

The ${POSE_ROOT} is described as below.

${POSE_ROOT}
|-- data
|-- lib
|-- main
|-- tool
`-- output
  • data contains data loading codes and soft links to images and annotations directories.
  • lib contains kernel codes for 2d multi-person pose estimation system.
  • main contains high-level codes for training or testing the network.
  • tool contains dataset converter. posetrack2coco_output.py converts posetrack output files to coco format.
  • output contains log, trained models, visualized outputs, and test result.

Data

You need to follow directory structure of the data as below.

${POSE_ROOT}
|-- data
|-- |-- MPII
|   `-- |-- input_pose
|       |   |-- name_of_input_pose.json
|       |   |-- test_on_trainset
|       |   |   | -- result.json
|       |-- annotations
|       |   |-- train.json
|       |   `-- test.json
|       `-- images
|           |-- 000001163.jpg
|           |-- 000003072.jpg
|-- |-- PoseTrack
|   `-- |-- input_pose
|       |   |-- name_of_input_pose.json
|       |   |-- test_on_trainset
|       |   |   | -- result.json
|       |-- annotations
|       |   |-- train2018.json
|       |   |-- val2018.json
|       |   `-- test2018.json
|       |-- original_annotations
|       |   |-- train/
|       |   |-- val/
|       |   `-- test/
|       `-- images
|           |-- train/
|           |-- val/
|           `-- test/
|-- |-- COCO
|   `-- |-- input_pose
|       |   |-- name_of_input_pose.json
|       |   |-- test_on_trainset
|       |   |   | -- result.json
|       |-- annotations
|       |   |-- person_keypoints_train2017.json
|       |   |-- person_keypoints_val2017.json
|       |   `-- image_info_test-dev2017.json
|       `-- images
|           |-- train2017/
|           |-- val2017/
|           `-- test2017/
`-- |-- imagenet_weights
|       |-- resnet_v1_50.ckpt
|       |-- resnet_v1_101.ckpt
|       `-- resnet_v1_152.ckpt
  • In the tool of TF-SimpleHumanPose, run python mpii2coco.py to convert MPII annotation files to MS COCO format (MPII/annotations).
  • In the tool of TF-SimpleHumanPose, run python posetrack2coco.py to convert PoseTrack annotation files to MS COCO format (PoseTrack/annotations).
  • Download imagenet pre-trained resnet models from tf-slim and place it in the data/imagenet_weights.
  • Except for annotations of the MPII and PoseTrack, all other directories are original version of downloaded ones.
  • If you want to add your own dataset, you have to convert it to MS COCO format.
  • You can change default directory structure of data by modifying dataset.py of each dataset folder.

Output

You need to follow the directory structure of the output folder as below.

${POSE_ROOT}
|-- output
|-- |-- log
|-- |-- model_dump
|-- |-- result
`-- |-- vis
  • Creating output folder as soft link form is recommended instead of folder form because it would take large storage capacity.
  • log folder contains training log file.
  • model_dump folder contains saved checkpoints for each epoch.
  • result folder contains final estimation files generated in the testing stage.
  • vis folder contains visualized results.
  • You can change default directory structure of output by modifying main/config.py.

Running PoseFix

Start

  • Run pip install -r requirement.txt to install required modules.
  • Run cd ${POSE_ROOT}/lib and make to build NMS modules.
  • In the main/config.py, you can change settings of the model including dataset to use, network backbone, and input size and so on.

Train

input_pose/test_on_trainset/result.json should be prepared before training. This is test result on the training set with the groundtruth bbox and used when synthesizing input pose of not annotated keypoints in the training stage. Testing result of TF-SimpleHumanPose is used.

In the main folder, run

python train.py --gpu 0-1

to train the network on the GPU 0,1.

If you want to continue experiment, run

python train.py --gpu 0-1 --continue

--gpu 0,1 can be used instead of --gpu 0-1.

Test

input_pose/name_of_input_pose.json is pose estimation result of any other method. You have to rename the it and also input_pose_path of the data/$DATASET/dataset.py. The input_pose/name_of_input_pose.json should be follow MS COCO format. To test on the PoseTrack dataset, run tool/posetrack2coco_output.py before testing to convert PoseTrack output files to COCO format.

Place trained model at the output/model_dump/$DATASET/ and pose estimation result of any other method (name_of_input_pose.json) to data/$DATASET/input_pose/.

In the main folder, run

python test.py --gpu 0-1 --test_epoch 140

to test the network on the GPU 0,1 with 140th epoch trained model. --gpu 0,1 can be used instead of --gpu 0-1.

Results

Here I report the performance of the PoseFix. Also, you can download pre-trained models of the PoseFix in here and test_on_trainset/result.json in here.

As this repo outputs compatible output files for MS COCO and PoseTrack, you can directly use cocoapi or poseval to evaluate result on the MS COCO or PoseTrack dataset. You have to convert the produced mat file to MPII mat format to evaluate on MPII dataset following this.

Results on MSCOCO 2017 dataset

We additionally applied our PoseFix on HRNet (Ke etal. CVPR2019), and achieved the top performance.

MSCOCO 2017 validation set

Method AP Ap .5 AP .75 AP (M) AP (L) AR AR .5 AR .75 AR (M) AR (L)
pose_hrnet_w48 76.3 90.8 82.9 72.3 83.4 81.2 94.2 87.1 76.7 87.6
PoseFix + HRNet 77.3 90.9 83.5 73.5 84.4 82.0 94.3 87.5 77.7 88.3

MSCOCO 2017 test-dev set

Method AP Ap .5 AP .75 AP (M) AP (L) AR AR .5 AR .75 AR (M) AR (L)
pose_hrnet_w48 75.5 92.5 83.3 71.9 81.5 80.5 95.7 87.4 76.3 86.3
PoseFix + HRNet 76.7 92.6 84.1 73.1 82.6 81.5 95.8 88.1 77.5 87.2
  • You have to set dataset, backbone and input_shape to those of the model in config.py.

Results on PoseTrack 2018 dataset

  • You have to set dataset, backbone and input_shape to those of the model in config.py.

Troubleshoot

  1. Those who are suffer from out of bound index issue, please refer this issue. According to TF docs, tf.scatter_nd will ignore out of bound indices in GPU mode. However, BruceLeeeee had a issue with that and fixed by clipping coordinates.

  2. For those who suffer from FileNotFoundError: [Errno 2] No such file or directory: 'tmp_result_0.pkl' in testing stage, please prepare input pose properly. The pkl files are generated and deleted automatically in testing stage, so you don't have to prepare them. Most of this error comes from inproper human detection file.

Acknowledgements

This repo is largely modified from TensorFlow repo of CPN and PyTorch repo of Simple.

Reference

@InProceedings{Moon_2019_CVPR_PoseFix,
author = {Moon, Gyeongsik and Chang, Juyong and Lee, Kyoung Mu},
title = {PoseFix: Model-agnostic General Human Pose Refinement Network},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year = {2019}
}

posefix_release's People

Contributors

mks0601 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

posefix_release's Issues

About Output shape

Thank your implementation.
I have a question about input shape. I looked into the code in main/config.py as below
stride
The question is why out_shape is input_shape // 4 ?
If I remembered correctly, the input shape size ( width, height ) will be 8 times smaller (width/8, height/8) after feeding it to Resnet network. It confused me a lot time :(. Thank you.

Some Question About the Train.py

tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[4] = [0, 0, 159, 4] does not index into shape [16,96,72,17]
[[{{node tower_0/ScatterNd}}]]

During handling of the above exception, another exception occurred:

the model architecture

Hi, thanks for your work. Can you provide model architecture picture or any other visible format?
Thanks a lot.

How to test on COCO test-set

Glad you share the code of your intersting work .
May I ask how to test your result on COCO2017 test-set cause I couldn't find keypoint annotations of COCO test-set or deliver my result of test-set in the http://cocodataset.org/#home .
I'd appreciate if you could share the annotations or show me how to find it.

inefficient heavy-CPU training

Hello,

I would like to ask how much time did one epoch take when you trained the model? and how much time for training 140 epochs [the checkpoint you published]?

I have managed to bring up the training and it looks like that the GPU is idle most of the time. I guess it is due to the heavy-CPU pose synthesis code, as shown below

image

According to my estimation, one COCO epoch is 9364 iterations. It takes 6 minutes to finish 30 iterations. This means 1 epoch will require 9364/30 * 6 = 1872.8 minutes = 31.2133333333 hours. That means it would take you around 150 days to finish 140 epochs right?

image

Thanks

Algorithm error

in lib/tfflat/base.py
iou algorithm
will it has impact on the training process?
ymax = np.minimum(dst_roi[:,1]+dst_roi[:,3], src_roi[:,0]+src_roi[:,3]) ->
ymax = np.minimum(dst_roi[:,1]+dst_roi[:,3], src_roi[:,1]+src_roi[:,3])

def compute_iou(self, src_roi, dst_roi):

    # IoU calculate with GTs
    xmin = np.maximum(dst_roi[:,0], src_roi[:,0])
    ymin = np.maximum(dst_roi[:,1], src_roi[:,1])
    xmax = np.minimum(dst_roi[:,0]+dst_roi[:,2], src_roi[:,0]+src_roi[:,2])
    ymax = np.minimum(dst_roi[:,1]+dst_roi[:,3], src_roi[:,0]+src_roi[:,3])
    
    interArea = np.maximum(0, xmax - xmin) * np.maximum(0, ymax - ymin)
    
    boxAArea = dst_roi[:,2] * dst_roi[:,3]
    boxBArea = np.tile(src_roi[:,2] * src_roi[:,3],(len(dst_roi),1))
    sumArea = boxAArea + boxBArea

    iou = interArea / (sumArea - interArea + 1e-5)

    return iou

This has an error

Thank you very much for this work, I have a question and hope to get some help.
when I run the code python test.py --gpu 0,1 --test_epoch 140
There is a erro

Process Worker-1:
Traceback (most recent call last):
  File "/opt/conda/envs/tensorflow/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/share8t/work/ZHR/POSE_ROOT/main/../lib/tfflat/mp_utils.py", line 34, in run
    msg = self._func(self.id, *self.args, **self.kwargs)
  File "test.py", line 202, in func
    range = [ranges[gpu_id], ranges[gpu_id + 1]]
IndexError: list index out of range
Traceback (most recent call last):
  File "test.py", line 233, in <module>
    test(int(args.test_epoch))
  File "test.py", line 206, in test
    result = MultiGPUFunc.work()
  File "/share8t/work/ZHR/POSE_ROOT/main/../lib/tfflat/mp_utils.py", line 82, in work
    id, msg = load_pkl( 'tmp_result_{}'.format(self._proc_ids[i]) )
  File "/share8t/work/ZHR/POSE_ROOT/main/../lib/tfflat/serialize.py", line 68, in load_pkl
    with open('{}.pkl'.format(name), 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'tmp_result_0.pkl'

input image normalization

Hello,

sorry for asking you too many questions.

I would like to know where the input images are actually normalized to ImageNet mean and standard deviation?

As far as I know, the code just subtracts the input image by the pixel_means = np.array([[[123.68, 116.78, 103.94]]])

image

The input heatmaps are in the range of [0, 255.0]

image

I can see two problems here

  • the input value ranges are big >> 1.0, doe sit cause any gradient problem?
  • the input value range of input image and input heatmaps are not on the same scale. Input images are subjected from the pixel_means, while the heatmap value ranges are in [0, 255].

Could you please describe a bit more about this kind of normalization? Or Did I miss something from your code?

Thanks!

Is there any plan to provide pre-trained weights available?

I've read the paper you wrote and found that this model agnostic post-processing concept is really great and I think it would also work great with my pose estimation model too.
However since there is no pre-trained weights that are trained end-to-end as suggested your paper I cannot validate my model with posefix right away. Is there any plan to provide pre-trained weights?

Thanks!

pre-train model?

Traceback (most recent call last):
File "test.py", line 220, in
test(int(args.test_epoch))
File "test.py", line 192, in test
result = MultiGPUFunc.work()
File "/home/cv2018/Documents/PoseFix/main/../lib/tfflat/mp_utils.py", line 82, in work
id, msg = load_pkl( 'tmp_result_{}'.format(self._proc_ids[i]) )
File "/home/cv2018/Documents/PoseFix/main/../lib/tfflat/serialize.py", line 68, in load_pkl
with open('{}.pkl'.format(name), 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'tmp_result_0.pkl'

where can I download this 'pkl'? and how to solve this problem? thank you !

About training on COCO

Hi, Thanks for your work. I tried to train on coco dataset and only changed dataset in default config, but I encountered the error as follow:

07-01 15:14:24 Initialize saver ...
07-01 15:14:27 Initialize all variables ...
07-01 15:14:39 Initialized model weights from /root/lsh2/PoseFix_RELEASE/main/../data/imagenet_weights/resnet_v1_152.ckpt ...
07-01 15:14:55 Start training ...
2019-07-01 15:15:19.420659: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at scatter_nd_op.cc:119 : Invalid argument: indices[3] = [0, 0, 159, 3] does not index into shape [16,96,72,17]
Traceback (most recent call last):
  File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1334, in _do_call
    return fn(*args)
  File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1319, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1407, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[3] = [0, 0, 159, 3] does not index into shape [16,96,72,17]
	 [[{{node tower_0/ScatterNd}} = ScatterNd[T=DT_FLOAT, Tindices=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](tower_0/Cast, tower_0/concat_8, tower_0/ScatterNd/shape)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/lsh2/PoseFix_RELEASE/main/train.py", line 31, in <module>
    trainer.train()
  File "/root/lsh2/PoseFix_RELEASE/main/../lib/tfflat/base.py", line 449, in train
    [self.graph_ops[0], self.lr, *self.summary_dict.values()], feed_dict=feed_dict)
  File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 929, in run
    run_metadata_ptr)
  File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1152, in _run
    feed_dict_tensor, options, run_metadata)
  File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1328, in _do_run
    run_metadata)
  File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1348, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[3] = [0, 0, 159, 3] does not index into shape [16,96,72,17]
	 [[node tower_0/ScatterNd (defined at /root/lsh2/PoseFix_RELEASE/main/model.py:108)  = ScatterNd[T=DT_FLOAT, Tindices=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](tower_0/Cast, tower_0/concat_8, tower_0/ScatterNd/shape)]]

Caused by op 'tower_0/ScatterNd', defined at:
  File "/root/lsh2/PoseFix_RELEASE/main/train.py", line 30, in <module>
    trainer = Trainer(Model(), cfg)
  File "/root/lsh2/PoseFix_RELEASE/main/../lib/tfflat/base.py", line 195, in __init__
    super(Trainer, self).__init__(net, cfg, data_iter, log_name='train_logs.txt')
  File "/root/lsh2/PoseFix_RELEASE/main/../lib/tfflat/base.py", line 125, in __init__
    self.build_graph()
  File "/root/lsh2/PoseFix_RELEASE/main/../lib/tfflat/base.py", line 142, in build_graph
    self.graph_ops = self._make_graph()
  File "/root/lsh2/PoseFix_RELEASE/main/../lib/tfflat/base.py", line 382, in _make_graph
    self.net.make_network(is_train=True)
  File "/root/lsh2/PoseFix_RELEASE/main/model.py", line 156, in make_network
    self.render_onehot_heatmap(target_coord, cfg.output_shape),\
  File "/root/lsh2/PoseFix_RELEASE/main/model.py", line 108, in render_onehot_heatmap
    heatmap = tf.scatter_nd(indices, probs, (batch_size, *output_shape, cfg.num_kps))
  File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 7077, in scatter_nd
    "ScatterNd", indices=indices, updates=updates, shape=shape, name=name)
  File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
  File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 488, in new_func
    return func(*args, **kwargs)
  File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3274, in create_op
    op_def=op_def)
  File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1770, in __init__
    self._traceback = tf_stack.extract_stack()

InvalidArgumentError (see above for traceback): indices[3] = [0, 0, 159, 3] does not index into shape [16,96,72,17]
	 [[node tower_0/ScatterNd (defined at /root/lsh2/PoseFix_RELEASE/main/model.py:108)  = ScatterNd[T=DT_FLOAT, Tindices=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](tower_0/Cast, tower_0/concat_8, tower_0/ScatterNd/shape)]]

Thanks for your time.

AssertionError

The following error occurred when I was running train.py file. Please tell me how to solve it. Thank you very much.

cannot read train2017/000000179322.jpg
cannot read train2017/000000205086.jpg
cannot read train2017/000000274079.jpg
Process _Worker-2:
cannot read train2017/000000426975.jpg
cannot read train2017/000000328791.jpg
Process _Worker-3:
Process _Worker-4:
cannot read train2017/000000332096.jpg
Process _Worker-5:
cannot read train2017/000000390718.jpg
Process _Worker-6:
cannot read train2017/000000477774.jpg
Process _Worker-7:
cannot read train2017/000000512793.jpg
Process _Worker-8:
Process _Worker-10:
Process _Worker-9:
Traceback (most recent call last):
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
Traceback (most recent call last):
File "/share8t/work/POSE_ROOT-Posefix/main/../lib/tfflat/data_provider.py", line 207, in run
dp = self.map_func(dp)
File "/share8t/work/POSE_ROOT-Posefix/main/gen_batch.py", line 342, in generate_batch
assert 0
Traceback (most recent call last):
AssertionError
File "/opt/conda/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/opt/conda/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/share8t/work/POSE_ROOT-Posefix/main/../lib/tfflat/data_provider.py", line 207, in run
dp = self.map_func(dp)
File "/share8t/work/POSE_ROOT-Posefix/main/../lib/tfflat/data_provider.py", line 207, in run
dp = self.map_func(dp)
File "/share8t/work/POSE_ROOT-Posefix/main/gen_batch.py", line 342, in generate_batch
assert 0
File "/opt/conda/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/share8t/work/POSE_ROOT-Posefix/main/gen_batch.py", line 342, in generate_batch
assert 0
File "/share8t/work/POSE_ROOT-Posefix/main/../lib/tfflat/data_provider.py", line 207, in run
dp = self.map_func(dp)
File "/share8t/work/POSE_ROOT-Posefix/main/gen_batch.py", line 342, in generate_batch
assert 0
AssertionError
AssertionError
AssertionError

Statistics on latency and throughput

I would like to ask if there is any information on the model's latency and throughput on common GPUs and CPUs such as the Nvidia T4, Intel i7 CPU, etc

Getting test result for single image input

Hi! I was trying to run the model for single image for the testing how it works. Initially it showed the tmp_result.pkl file not found error which I solved by removing the dependency of the code on temporary results.

I am having my input image in coco dataset format yet i am facing this error while running the code now I get the following error.
Is there a specific way to get rid of this error??

Screenshot from 2019-09-06 19-10-39

speed of PoseFix

thank you for that awesome release. But can you tell me how to calculate speed per one image when testing?

How do you use the error statistics as prior information?

There is a problem bothering me after reading your interesting work.
You said "We use this error statistics as prior infromation to generate synthetic posese and use the synthesized poses to train our model" in Abatract. While you use the output heatmaps from other model as input to generate a better poses result, but what is this to do with "error statistics distribution"?
Looking forward to you reply, thanks!

About training on MPII datasets

Hi, thanks for your work. However, I can't find the mpii2coco.py in tool , and I'm confused that how to get the input pose json. Would you mind telling me how to get them? Thanks for your time.

log of training

Sincerely thanks for your contribution!
Would it is presumptuous of me to ask you to provide the log file of training process?
As my training with this repository didn't converge.
I used the following common and change nothing of the respository:
python train.py --gpu 0-7
here is part of the log
train_logs.txt

input pose

I have troubles understanding how exactly to prepare the input pose. What is the difference in between the test_on_trainset_path and input_pose_path (line 33 and 34 in dataset.py)?
I would like to test with your provided keypoint results, which I got from your result section, but I'm unsure on where to put them. I tried both ...input_pose/test_on_trainset/result.json and ...input_pose/person_keypoints_test-dev2017_Simple152_results.json

But unfortunatly I'm getting the No such file or directory 'tmp_results_0.pkl' mistake which indicates that I didn't prepare the input pose as needed.

I tried all different testsets too ( train, val, test in config.py).

In the end I would like to implement your code in combination with HRNet, but just wanted to get it up and running with your provided results first.

Thanks in advance!

About Fig.5 in your paper

Hi, @mks0601
Is the fifth column 'Heatmap' in Figure 5 from network output or softmax output?
Can you explain in detail how to draw 'Heatmap'. No relevant code was found on the project.

A question about the input results

Whether the results of test_on_trainset and input_pose need rescore and oks_nms processing?
I trained the Pose Fix with res152 and default parameters, but the metric was reduced by 0.1. I think it may be that the input pose results have been treated as above.

About the processing during test

First, thank you for sharing your great work!
In Section 7.3 in your paper, there goes:

we used their released codes and pre-trained models. We tested them by ourselves without ensembling and testing time augmentation.

Did you mean using single input for all the related approaches (PAFs [5], AE [20], Mask R-CNN [11], CPN [7], and Simple [30])? I'm not clear. Which procedure is yours in the paper:

  1. Only single input to the model
  2. Multi input to the model (probably with flip augmentation)
  3. Multi input and flip augmentation but without model ensemble

Because for bottom-up approaches, they must use multi-scale input images to cover the variant scales of poses. And for other top-down approaches, they usually use flip augmentation to improve precision.

Looking forward to your help. Thank you!

I can't use my GPU?

I run the pretrain model on tensorflow-gpu1.8.0.
The system print Generating testing graph on 1 GPUs ... two times.
But it needs several hours to finish the test process.
And I use nvidia-smi to check my gpus and I find nothing running on them.
What's the problem? Thanks for your reply.

About the input_pose

Thanks for your work and the patience. I have encountered the error as follow:

Traceback (most recent call last):
  File "train.py", line 30, in <module>
    trainer = Trainer(Model(), cfg)
  File "/export/home/cyh/PoseFix_RELEASE/main/../lib/tfflat/base.py", line 198, in __init__
    self._data_iter, self.itr_per_epoch = self._make_data()
  File "/export/home/cyh/PoseFix_RELEASE/main/../lib/tfflat/base.py", line 226, in _make_data
    with open(d.test_on_trainset_path, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '../data/COCO/input_pose/test_on_trainset/result.json'

And I try to use the TF-SimpleHumanPose to generate the test_on_trainset/result.json, however, I found that you don't provide the detections results on the train2017. Would you mind offering the detcetions on that, or you could you please directly offer the test_on_trainset/result.json on train2017? Thanks for your time.

getting start with the result.json

First of all, thanks for you generous sharing! When I run the Test by the the tips you list, I got the error that "FileNotFoundError: [Errno 2] No such file or directory: '../data/PoseTrack/input_pose/result.json'". How can I get or prepare the result.json file? Looking forward to your replying!

the usage of the softmaxed heatmaps as the keypoint confidence scores

Hello,

I would like to ask another 2 questions regarding your normalized softmax heatmaps.

Here ist the context for the two questions:

I am trying to output confidence scores from your model by extracting the peaks from your normalized softmax heatmap.

But it seems that this kind of integral heatmaps is not suitable for usage as a confidence score. the peak values are very small [just around 0.2] even the input image is a very simple case.

Here is one example, the peak value from this heatmap is just 0.246 why the key point is very distinctive.
image

Another example is that when I passed in a random image with a correct initial guess to the model, the output heatmaps still look similar to the input initial guess, as shown below. This means that this kind of heat map cannot be used as a confidence score, I am right?

image

And here is the heatmap I used for visualization.

image

So my questions are:

  • Am I right that the integral heatmaps can not be used as confidence scores.

  • If it's not, is there any way I can achieve confidence scores from an approach like PoseFix?

Thanks and I look forward to hearing from you soon.
Best
Khanh

Find data

Thank you for providing this function. Where can I find name_of_input_pose. Json and result.json ? Can you provide the download address

About backbones

Thanks to your brilliant works in PoseFix, but I wonder if I change the backbone from resnet152 to stacked hourglass (maybe 2 stacks) will the performance get better? Really appreciate your reply.

Combining all the three datasets

Hi @mks0601 , I would like to implement training on this repo, but instead of a standalone dataset. I wish to combine all the 3 datasets - COCO, MPII and PoseTrack. I want to know whether that is possible? My doubt is that COCO and PoseTrack have different keypoints. Any ideas?

Run nms on Windows

The nms library is created to work on linux only (so we have issues with cuda location etc). Any version of it may work on windows 10?

the reason behind the usage of render_onehot_heatmap for training target instead of render_gaussian_heatmap

Hi, I would like to ask about the difference between the two kinds of heatmaps in two repositories from you.

  • In the PoseFix repo, I noticed that you used render_one_heatmap for generating the training target, as shown below.

image

  • However, in another repo from you TF-SimpleHumanPose, the gaussian heatmap function is used for generating the training target instead, as shown below.

image

Could you please help me clarify two things?

  • Is there are paper/or description behind your render_one_hot_heatmap function?

  • Is there any advantage of your render_onehot_heatmap over render_gaussian_heatmap that motivated you to use it in your PoseFix repo?

Thank you for your patience and I look forward to hearing from you soon.

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.