Comments (4)
The lib is tested by pytorch v0.4.0 and v0.4.1, not tested by pytorch v0.5.0. Please switch to v0.4.1 or v0.4.0.
And also it is developed using python3 not python2, it seems your environment is python2.
from human-pose-estimation.pytorch.
Hi, I am having an issue with pytorch v0.4.1 and python3 as below. Any suggestion as to what the issue might be, will be really helpful. Thanks.
=> loading model from models/pytorch/pose_coco/pose_resnet_50_384x288.pth.tar
/usr/local/lib/python3.5/dist-packages/torch/nn/functional.py:52: UserWarning: size_average and reduce args will be deprecated, please use reduction='elementwise_mean' instead.
warnings.warn(warning.format(ret))
loading annotations into memory...
Done (t=0.25s)
creating index...
index created!
=> classes: ['__background__', 'person']
=> num_images: 5000
=> load 6352 samples
OpenCV(3.4.1) Error: Assertion failed (src.cols > 0 && src.rows > 0) in warpAffine, file /io/opencv/modules/imgproc/src/imgwarp.cpp, line 2691
OpenCV(3.4.1) Error: Assertion failed (src.cols > 0 && src.rows > 0) in warpAffine, file /io/opencv/modules/imgproc/src/imgwarp.cpp, line 2691
OpenCV(3.4.1) Error: Assertion failed (src.cols > 0 && src.rows > 0) in warpAffine, file /io/opencv/modules/imgproc/src/imgwarp.cpp, line 2691
OpenCV(3.4.1) Error: Assertion failed (src.cols > 0 && src.rows > 0) in warpAffine, file /io/opencv/modules/imgproc/src/imgwarp.cpp, line 2691
OpenCV(3.4.1) Error: Assertion failed (src.cols > 0 && src.rows > 0) in warpAffine, file /io/opencv/modules/imgproc/src/imgwarp.cpp, line 2691
OpenCV(3.4.1) Error: Assertion failed (src.cols > 0 && src.rows > 0) in warpAffine, file /io/opencv/modules/imgproc/src/imgwarp.cpp, line 2691
Traceback (most recent call last):
File "pose_estimation/valid.py", line 165, in <module>
OpenCV(3.4.1) Error: Assertion failed (src.cols > 0 && src.rows > 0) in warpAffine, file /io/opencv/modules/imgproc/src/imgwarp.cpp, line 2691
main()
File "pose_estimation/valid.py", line 161, in main
OpenCV(3.4.1) Error: Assertion failed (src.cols > 0 && src.rows > 0) in warpAffine, file /io/opencv/modules/imgproc/src/imgwarp.cpp, line 2691
final_output_dir, tb_log_dir)
File "/human-pose-estimation.pytorch/pose_estimation/../lib/core/function.py", line 108, in validate
OpenCV(3.4.1) Error: Assertion failed (src.cols > 0 && src.rows > 0) in warpAffine, file /io/opencv/modules/imgproc/src/imgwarp.cpp, line 2691
for i, (input, target, target_weight, meta) in enumerate(val_loader):
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 336, in __next__
return self._process_next_batch(batch)
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
cv2.error: Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 106, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 106, in <listcomp>
samples = collate_fn([dataset[i] for i in batch_indices])
File "/human-pose-estimation.pytorch/pose_estimation/../lib/dataset/JointsDataset.py", line 104, in __getitem__
flags=cv2.INTER_LINEAR)
cv2.error: OpenCV(3.4.1) /io/opencv/modules/imgproc/src/imgwarp.cpp:2691: error: (-215) src.cols > 0 && src.rows > 0 in function warpAffine
from human-pose-estimation.pytorch.
@shreyasrajesh , please make sure that you put your data at the right path. The directory should be like this:
|-- data
`-- |-- coco
`-- |-- annotations
| |-- person_keypoints_train2017.json
| `-- person_keypoints_val2017.json
|-- person_detection_results
| |-- COCO_val2017_detections_AP_H_56_person.json
`-- images
|-- train2017
| |-- 000000000009.jpg
| |-- 000000000025.jpg
| |-- 000000000030.jpg
| |-- ...
`-- val2017
|-- 000000000139.jpg
|-- 000000000285.jpg
|-- 000000000632.jpg
|-- ...
from human-pose-estimation.pytorch.
The problem was solved by install pytorch-0.4.0.
from human-pose-estimation.pytorch.
Related Issues (20)
- 关于数据增强的疑惑。
- Help with Transfer Learning
- 模型的速度问题
- 关于数据处理,请大神解惑。 HOT 1
- 检测部分的代码 HOT 1
- 训练结果低于作者给的结果 HOT 3
- I have an error when I load image file in data/coco/images/val2017 HOT 2
- About the rotation of test_set in MPII
- cpu_nms HOT 1
- TypeError: _update_dict() missing 1 required positional argument: 'code' HOT 2
- experiments and core.config
- 只能实现单人姿态估计?
- TypeError: unhashable type: 'slice'
- flip_pairs?
- Which part of this code that explains joint propagation using optical flow?
- This repo is missing important files HOT 1
- lib make error HOT 1
- Support inference in C++
- Pretrained 2d pose estimation with resnet50 backbone
- How to I run demo in video.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from human-pose-estimation.pytorch.