Git Product home page Git Product logo

Comments (4)

leoxiaobin avatar leoxiaobin commented on July 29, 2024

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.

shreyasrajesh avatar shreyasrajesh commented on July 29, 2024

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.

leoxiaobin avatar leoxiaobin commented on July 29, 2024

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

lxltaibo avatar lxltaibo commented on July 29, 2024

The problem was solved by install pytorch-0.4.0.

from human-pose-estimation.pytorch.

Related Issues (20)

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.