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.
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:
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
see above
You might select multiple topics, delete the rest:
see OpenPose Output
Commit from Jul 18, 2019: 0a7d5b8
General configuration:
lsb_release -a in Ubuntu):gcc --version in Ubuntu or VS version in Windows): gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0 (Ubuntu)Non-default settings:
3rd-party software:
cmake --version in Ubuntu): cmake version 3.15.2 (Ubuntu)apt-get install libopencv-dev (only Ubuntu)If Python API:
python -c "import numpy; print numpy.version.version" in Ubuntu): 1.17.0--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.
Issue Summary
When trying to write coco json output, an error occurs. This applies to the simple example
01_body_from_image.pywhen adding the lineparams["write_coco_json"] = "output/test.json". Two other postings had similar issues but no solution was presented #1287 #1263Using 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.pyprovided in this repo. Adding the lineparams["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 0Errors (if any)
see above
Type of Issue
You might select multiple topics, delete the rest:
- Execution error
- Help wanted
Your System Configuration
- Whole console output:
see OpenPose Output
- OpenPose version:
Commit from Jul 18, 2019: 0a7d5b8
General configuration:
- Installation mode: (Ubuntu); CMake GUI
- Operating system (
lsb_release -ain 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 --versionin Ubuntu or VS version in Windows): gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0 (Ubuntu)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
3rd-party software:
- Caffe version: Default from OpenPose
- CMake version (
cmake --versionin Ubuntu): cmake version 3.15.2 (Ubuntu)- OpenCV version: pre-compiled
apt-get install libopencv-dev(only Ubuntu)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
Interesting. Unfortunately it didn't work for me.
Most helpful comment
--write_coco_jsonis to be used with the original COCO images. If you are not applying those, OpenPose cannot obtain the ID from their file names.