CMU-Perceptual-Computing-Lab / openpose

OpenPose: Real-time multi-person keypoint detection library for body, face, hands, and foot estimation
https://cmu-perceptual-computing-lab.github.io/openpose
Other
31.15k stars 7.86k forks source link

Error: stoull using flag "write_coco_json" in Ubuntu, Python. #1342

Closed Hunkzer closed 5 years ago

Hunkzer commented 5 years ago

Issue Summary

When trying to write coco json output, an error occurs. This applies to the simple example 01_body_from_image.py when adding the line params["write_coco_json"] = "output/test.json". Two other postings had similar issues but no solution was presented #1287 #1263

Using flag "write_json" instead does not result in an error.

Executed Command (if any)

Behavior has been tested with the simple example 01_body_from_image.py provided in this repo. Adding the line params["write_coco_json"] = "test.json" results in the error below:

OpenPose Output (if any)

Starting OpenPose Python Wrapper...
Auto-detecting all available GPUs... Detected 1 GPU(s), using 1 of them starting at GPU 0.

Error:
stoull

Coming from:
- /home/.../openpose/src/openpose/utilities/string.cpp:getLastNumber():15
- /home/.../openpose/src/openpose/filestream/cocoJsonSaver.cpp:record():258
- /home/.../openpose/include/openpose/filestream/wCocoJsonSaver.hpp:workConsumer():82
- /home/.../openpose/include/openpose/thread/workerConsumer.hpp:work():44
Body keypoints: 
[[[...]]
 ...
 [[...]]]

Error occurred on a thread. OpenPose closed all its threads and then propagated the error to the main thread. Error description:

stoull

Coming from:
- /home/.../openpose/src/openpose/utilities/string.cpp:getLastNumber():15
- /home/.../openpose/src/openpose/filestream/cocoJsonSaver.cpp:record():258
- /home/.../openpose/include/openpose/filestream/wCocoJsonSaver.hpp:workConsumer():82
- /home/.../openpose/include/openpose/thread/workerConsumer.hpp:work():44
- [All threads closed and control returned to main thread]
- /home/.../openpose/src/openpose/utilities/errorAndLog.cpp:checkWorkerErrors():280
- /home/.../openpose/include/openpose/thread/threadManager.hpp:stop():243
- /home/.../openpose/include/openpose/wrapper/wrapper.hpp:stop():455
- /home/.../openpose/include/openpose/wrapper/wrapper.hpp:~WrapperT():282
- [Error occurred in a destructor or in the OpenPose Unity Plugin, so no std::exception has been thrown. Returning with exit status 0]

Process finished with exit code 0

Errors (if any)

see above

Type of Issue

You might select multiple topics, delete the rest:

Your System Configuration

  1. Whole console output:

see OpenPose Output

  1. OpenPose version:

Commit from Jul 18, 2019: 0a7d5b8

  1. General configuration:

    • Installation mode: (Ubuntu); CMake GUI
    • Operating system (lsb_release -a in Ubuntu): Distributor ID: Ubuntu Description: Ubuntu 18.04.3 LTS Release: 18.04 Codename: bionic
    • Operating system version (e.g., Ubuntu 16, Windows 10, ...): Ubuntu 18
    • Release or Debug mode? (by default: release): release
    • Compiler (gcc --version in Ubuntu or VS version in Windows): gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0 (Ubuntu)
  2. Non-default settings:

    • 3-D Reconstruction module added? (by default: no): no
    • Any other custom CMake configuration with respect to the default version? (by default: no): enabled python
  3. 3rd-party software:

    • Caffe version: Default from OpenPose
    • CMake version (cmake --version in Ubuntu): cmake version 3.15.2 (Ubuntu)
    • OpenCV version: pre-compiled apt-get install libopencv-dev (only Ubuntu)
  4. If Python API:

    • Python version: 3.6.8, installed within a virtual environment.
    • Numpy version (python -c "import numpy; print numpy.version.version" in Ubuntu): 1.17.0
gineshidalgo99 commented 5 years ago

--write_coco_json is to be used with the original COCO images. If you are not applying those, OpenPose cannot obtain the ID from their file names.

manansaxena commented 5 years ago

Issue Summary

When trying to write coco json output, an error occurs. This applies to the simple example 01_body_from_image.py when adding the line params["write_coco_json"] = "output/test.json". Two other postings had similar issues but no solution was presented #1287 #1263

Using flag "write_json" instead does not result in an error.

Executed Command (if any)

Behavior has been tested with the simple example 01_body_from_image.py provided in this repo. Adding the line params["write_coco_json"] = "test.json" results in the error below:

OpenPose Output (if any)

Starting OpenPose Python Wrapper...
Auto-detecting all available GPUs... Detected 1 GPU(s), using 1 of them starting at GPU 0.

Error:
stoull

Coming from:
- /home/.../openpose/src/openpose/utilities/string.cpp:getLastNumber():15
- /home/.../openpose/src/openpose/filestream/cocoJsonSaver.cpp:record():258
- /home/.../openpose/include/openpose/filestream/wCocoJsonSaver.hpp:workConsumer():82
- /home/.../openpose/include/openpose/thread/workerConsumer.hpp:work():44
Body keypoints: 
[[[...]]
 ...
 [[...]]]

Error occurred on a thread. OpenPose closed all its threads and then propagated the error to the main thread. Error description:

stoull

Coming from:
- /home/.../openpose/src/openpose/utilities/string.cpp:getLastNumber():15
- /home/.../openpose/src/openpose/filestream/cocoJsonSaver.cpp:record():258
- /home/.../openpose/include/openpose/filestream/wCocoJsonSaver.hpp:workConsumer():82
- /home/.../openpose/include/openpose/thread/workerConsumer.hpp:work():44
- [All threads closed and control returned to main thread]
- /home/.../openpose/src/openpose/utilities/errorAndLog.cpp:checkWorkerErrors():280
- /home/.../openpose/include/openpose/thread/threadManager.hpp:stop():243
- /home/.../openpose/include/openpose/wrapper/wrapper.hpp:stop():455
- /home/.../openpose/include/openpose/wrapper/wrapper.hpp:~WrapperT():282
- [Error occurred in a destructor or in the OpenPose Unity Plugin, so no std::exception has been thrown. Returning with exit status 0]

Process finished with exit code 0

Errors (if any)

see above

Type of Issue

You might select multiple topics, delete the rest:

  • Execution error
  • Help wanted

Your System Configuration

  1. Whole console output:

see OpenPose Output

  1. OpenPose version:

Commit from Jul 18, 2019: 0a7d5b8

  1. General configuration:

    • Installation mode: (Ubuntu); CMake GUI
    • Operating system (lsb_release -a in Ubuntu): Distributor ID: Ubuntu Description: Ubuntu 18.04.3 LTS Release: 18.04 Codename: bionic
    • Operating system version (e.g., Ubuntu 16, Windows 10, ...): Ubuntu 18
    • Release or Debug mode? (by default: release): release
    • Compiler (gcc --version in Ubuntu or VS version in Windows): gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0 (Ubuntu)
  2. Non-default settings:

    • 3-D Reconstruction module added? (by default: no): no
    • Any other custom CMake configuration with respect to the default version? (by default: no): enabled python
  3. 3rd-party software:

    • Caffe version: Default from OpenPose
    • CMake version (cmake --version in Ubuntu): cmake version 3.15.2 (Ubuntu)
    • OpenCV version: pre-compiled apt-get install libopencv-dev (only Ubuntu)
  4. If Python API:

    • Python version: 3.6.8, installed within a virtual environment.
    • Numpy version (python -c "import numpy; print numpy.version.version" in Ubuntu): 1.17.0

It worked for me by changing the name of the testing image to contain only numerals. Like, 1.jpeg

Hunkzer commented 5 years ago

Interesting. Unfortunately it didn't work for me.