8000 Installed libtorch-cuda10-1.2.0,opencv4.0.1 . When I make an error, have anyone encountered and solved this problem? · Issue #31 · weixu000/libtorch-yolov3-deepsort · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Installed libtorch-cuda10-1.2.0,opencv4.0.1 . When I make an error, have anyone encountered and solved this problem? #31
Open
@yzqxy

Description

@yzqxy

In file included from /home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:5:0:
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h: In function ‘std::array<long int, 2ul> letterbox_dim(c10::IntArrayRef, c10::IntArrayRef)’:
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:11:22: error: missing template arguments before ‘{’ token
return std::array{int64_t(img_h * s), int64_t(img_w * s)};
^
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:11:22: error: expected ‘;’ before ‘{’ token
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:11:61: error: expected ‘;’ before ‘}’ token
return std::array{int64_t(img_h * s), int64_t(img_w * s)};
^
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h: In function ‘cv::Mat letterbox_img(const cv::Mat&, c10::IntArrayRef)’:
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:16:9: error: expected unqualified-id before ‘[’ token
auto[new_h, new_w] = letterbox_dim({img.rows, img.cols}, box);
^
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:16:60: error: expected primary-expression before ‘,’ token
auto[new_h, new_w] = letterbox_dim({img.rows, img.cols}, box);
^
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:21:30: error: ‘new_h’ was not declared in this scope
out({int((h - new_h) / 2), int((h - new_h) / 2 + new_h)},
^
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:22:30: error: ‘new_w’ was not declared in this scope
{int((w - new_w) / 2), int((w - new_w) / 2 + new_w)}),
^
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:22:72: error: no match for call to ‘(cv::Mat) (, )’
{int((w - new_w) / 2), int((w - new_w) / 2 + new_w)}),
^
In file included from /usr/local/include/opencv2/core/mat.hpp:3699:0,
from /usr/local/include/opencv2/core.hpp:59,
from /usr/local/include/opencv2/opencv.hpp:52,
from /home/libtorch-yolov3-deepsort/detection/include/Detector.h:6,
from /home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:3:
/usr/local/include/opencv2/core/mat.inl.hpp:904:5: note: candidate: cv::Mat cv::Mat::operator()(cv::Range, cv::Range) const
Mat Mat::operator()( Range rowRange, Range colRange ) const
/usr/local/include/opencv2/core/mat.inl.hpp:904:5: note: no known conversion for argument 1 from ‘’ to ‘cv::Range’
/usr/local/include/opencv2/core/mat.inl.hpp:910:5: note: candidate: cv::Mat cv::Mat::operator()(const Rect&) const
Mat Mat::operator()( const Rect& roi ) const
^
/usr/local/include/opencv2/core/mat.inl.hpp:910:5: note: candidate expects 1 argument, 2 provided
/usr/local/include/opencv2/core/mat.inl.hpp:916:5: note: candidate: cv::Mat cv::Mat::operator()(const cv::Range*) const
Mat Mat::operator()(const Range* ranges) const
^
/usr/local/include/opencv2/core/mat.inl.hpp:916:5: note: candidate expects 1 argument, 2 provided
/usr/local/include/opencv2/core/mat.inl.hpp:922:5: note: candidate: cv::Mat cv::Mat::operator()(const std::vectorcv::Range&) const
Mat Mat::operator()(const std::vector& ranges) const
^
/usr/local/include/opencv2/core/mat.inl.hpp:922:5: note: candidate expects 1 argument, 2 provided
In file included from /home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:5:0:
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h: In function ‘void inv_letterbox_bbox(at::Tensor, c10::IntArrayRef, c10::IntArrayRef)’:
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:31:9: error: expected unqualified-id before ‘[’ token
auto[new_h, new_w] = letterbox_dim(img_dim, box_dim);
^
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:33:34: error: ‘new_w’ was not declared in this scope
bbox.select(1, 0).add
(-(w - new_w) / 2).mul
(1.0f * img_w / new_w);
^
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:36:34: error: ‘new_h’ was not declared in this scope
bbox.select(1, 1).add_(-(h - new_h) / 2).mul_(1.0f * img_h / new_h);
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp: In function ‘auto {anonymous}::threshold_confidence(at::Tensor, float)’:
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:14:13: error: expected unqualified-id before ‘[’ token
auto[max_cls_score, max_cls] = pred.slice(1, 5).max(1);
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:15:9: error: ‘max_cls_score’ was not declared in this scope
max_cls_score *= pred.select(1, 4);
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:22:32: error: ‘max_cls’ was not declared in this scope
max_cls.index_select(0, index),
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp: In member function ‘std::vector<cv::Rect_ > Detector::detect(cv::Mat)’:
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:87:9: error: expected unqualified-id before ‘[’ token
auto[bbox, cls, scr] = threshold_confidence(prediction, confidence_threshold);
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:88:5: error: ‘bbox’ was not declared in this scope
bbox = bbox.cpu();
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:89:5: error: ‘cls’ was not declared in this scope
cls = cls.cpu();
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:90:5: error: ‘scr’ was not declared in this scope
scr = scr.cpu();
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:99:35: error: expected primary-expression before ‘float’
auto bbox_acc = bbox.accessor<float, 2>();
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:100:33: error: expected primary-expression before ‘float’
auto scr_acc = scr.accessor<float, 1>();
^
detection/CMakeFiles/detection.dir/build.make:89: recipe for target 'detection/CMakeFiles/detection.dir/src/Detector.cpp.o' failed
make[2]: *** [detection/CMakeFiles/detection.dir/src/Detector.cpp.o] Error 1
CMakeFiles/Makefile2:151: recipe for target 'detection/CMakeFiles/detection.dir/all' failed
make[1]: *** [detection/CMakeFiles/detection.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0