-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GOTURN Tracker results in errors #941
Comments
/cc @Auron-X |
@bassamarshad Thank you for detailed description of the bug in GOTURN. I will try to fix it ASAP |
Well apparently using #include <opencv2/core/ocl.hpp> this and using heaocl::setUseOpenCL(false); like 1st line in main() solves the first problem mentioned. |
I'm getting exactly the same error on OpenCV 3.2.0 & opencv_contrib 3.2.0 (Ubuntu 16.04) after the selection of a bounding box:
Could it be related to the .prototxt and .caffemodel files from opencv_extra repository? I used the same files as basamarshad. |
Hello. I am still working on this bug, apparently there is some issue with dnn/tracking modules used in combo. For now you can try GOTURN outside of the OpenCV tracking API, using an example on my Github: https://github.com/Auron-X/GOTURN-Example |
Thanks to @LorenaGdL for the PR about this bug, I didn't meet this issue with latest code.
I just download *.ptototxt and *.caffemodel, and put them to my VS program folder. Then add "path to test video" in Command Arguments. BTW, my main.cpp is below:
I don't know how to fix it, I will be appreciate if anyone can help me. |
@ChaselS314 I have the same problem with you when i use GOTURN on latest code. It seems that getPinByAlias() return a invalid variable pin when parser the '.data1' by splitPin() in dnn.cpp line 296&266:
Therefore, setBlob() raise an error about ‘.data1’.
But I am not familliar with C++ so i do not know how to solve it. |
Still getting this error on OpenCV 3.2 and Ubuntu 14.04, CUDA 8.0 Titan X GPU |
@ChaselS314, @xiaochus OpenCV Error: Requested object was not found (Requested blob ".data1" not found) in cv::dnn::Net::setBlob, file C:\opencv3_2\opencv_contrib-master\modules\dnn\src\dnn.cpp, line 516 The above error seems to be caused by the mismatching of the goturn.prototxt file. in my case : l-> blobs.size () is 0. |
[libprotobuf ERROR /opt/opencv/320deb/modules/dnn/3rdparty/protobuf/sources/protobuf-3.1.0/src/google/protobuf/text_format.cc:298] Error parsing text-format caffe.NetParameter: 7:1: Expected identifier, got: < OpenCV Error: Unspecified error (GOTURN network loading error...) in cv::gtr::InitImpl, file gtrTracker.cpp, line 117 |
I get the following exotic errors when trying to run GOTURN via OpenCV:
I am also a bit confused by the comment here https://github.com/opencv/opencv_contrib/blob/master/modules/tracking/samples/goturnTracker.cpp where it says
As the OpenCV Extra repo doesn't seem to contain any Goturn caffemodel, pretrained or otherwise. I downloaded it from http://cs.stanford.edu/people/davheld/public/GOTURN/trained_model/tracker.caffemodel instead. Is that is what is intended, or is it some other .caffemodel file one is supposed to use? |
I think something is weird in those lines. In my goturn.prototxt there is no .data1 and .data2 field only data1 and data2 if I delete point before data then exception given by @lChaselS314 doest not occur :
my goturn.prototxt file is
|
Dear All, Has this issue been fixed ?, is there a example code for the same . |
I changed net.setInput(targetBlob, ".data1"); to net.setInput(targetBlob, "data1"); and it no longer crashes, (btw very slow) |
In goturn.prototxt, |
OpenCV Error: Requested object was not found (Requested blob "data1" not found) |
OpenCV goturn did not work at all, i just download the files and run from my machine with codes not Tracker API, i get this issue, anyone else got the same issue on this, or any suggestion //? |
|
can work now, i loaded the wrong net var... |
Hi, I got the same error as yours. Could you gui me how to load the right net var?? Thank you. |
just refer to the source code - gtrTracker.cpp |
Thank for your reply. I spent one day to get goturn to work. But not success. I got this error: I got the model here: https://github.com/opencv/opencv_extra/tree/c4219d5eb3105ed8e634278fad312a1a8d2c182d/testdata/tracking Could you please share your model and a test code. Or do you have any suggestion. Thank you very much. |
can work now, performance and speed are not good |
ohh~~~ |
I think there is an error in targetPatch and searchPatch are of type |
I got this error: what is the reason |
Dear Author:
|
@HnanYang Why do you think that this problem should be fixed in OpenCV? I don't see any OpenCV calls in stacktraces. |
@alalek emm... I asked a question in the wrong place. But this Error bothered me for a long time |
Hi all, Does anyone know what this error means:
I compiled opencv 3.4.1 from anaconda using: The tracker can be created but cannot be initialized. Using the .prototxt and .caffemodel from this tutorial: https://www.learnopencv.com/goturn-deep-learning-based-object-tracking/ Running in Spyder, Python 3.6.2, Anaconda custom (32-bit), Windows 7. Do I need to build opencv from source? |
Hey everyone cv2.error: OpenCV(4.1.2) /io/opencv/modules/dnn/src/caffe/caffe_io.cpp:1121: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open "goturn.prototxt" in function 'ReadProtoFromTextFile' I like to know what do you think |
Take a closer look at the solution in the tutorial. |
|
System information (version)
Detailed description
I have been trying to run the GOTURN tracker OpenCV implementation. I was firstly not able to find the goturn.prototxt and goturn.caffemodel (pretrained versions) on the opencv_extra github site, but was able to pull them from other github repos.
The program fails on execution with the following error, as soon as you select a ROI :
OpenCV Error: Assertion failed (input.dims() == 4 && (input.type() == CV_32F || input.type() == CV_64F)) in cv::dnn::ConvolutionLayerImpl::allocate, file E:\opencv3.2.0_sources\opencv_contrib-master\modules\dnn\src\layers\convolution_layer.cpp, line 90
OpenCV Error: Assertion failed (The following error occured while making allocate() for layer "conv11": input.dims() == 4 && (input.type() == CV_32F || input.type() == CV_64F)) in cv::dnn::ConvolutionLayerImpl::allocate, file E:\opencv3.2.0_sources\opencv_contrib-master\modules\dnn\src\layers\convolution_layer.cpp, line 90
I tried fixing this by updating the following lines of code in gtrtacker.cpp as follows :
dnn::Blob targetBlob = dnn::Blob(targetPatch);
dnn::Blob searchBlob = dnn::Blob(searchPatch);
TO
dnn::Blob targetBlob = dnn::Blob::fromImages(targetPatch);
dnn::Blob searchBlob = dnn::Blob::fromImages(searchPatch);
NOW,
I get a different error altogether that seems to have something to do with OpenCL, i get this error in the allocate() function in dnn.cpp ::
OpenCV Error: Assertion failed (dims <= 3) in cv::ocl::OpenCLAllocator::checkContinuous, file E:\opencv3.2.0_sources\3.2.0\opencv-3.2.0\modules\core\src\ocl.cpp, line 4899
OpenCV Error: Assertion failed (The following error occured while making forward() for layer "concat1": dims <= 3) in cv::ocl::OpenCLAllocator::checkContinuous, file E:\opencv3.2.0_sources\3.2.0\opencv-3.2.0\modules\core\src\ocl.cpp, line 4899
0x00007FFD18AC7788 (0x000000AAD070BBF8 0x000000AAD070BC00 0x000000AAD070BC08 0x00007FFD18D38CC1), RaiseException() + 0x68 bytes(s)
0x00007FFCF5F74582 (0x00007FFCDBED0000 0x000000AAD071BD50 0x0000021C8281D384 0x00007FFD18D30000), _CxxThrowException() + 0xC2 bytes(s)
0x00007FFCDC53A45A (0x0000000000000029 0x0000000000000000 0x0000000000000000 0x0000000000000000), cv::error() + 0x15A bytes(s), e:\opencv3.2.0_sources\3.2.0\opencv-3.2.0\modules\core\src\system.cpp, line 661 + 0x1E byte(s)
0x00007FFCDC53A5A0 (0x000000AAD071E3D0 0x0000000000000000 0x000000AAD071CB90 0x0000021C81BB9E64), cv::error() + 0x140 bytes(s), e:\opencv3.2.0_sources\3.2.0\opencv-3.2.0\modules\core\src\system.cpp, line 666 + 0x109 byte(s)
0x00007FFCDD71E173 (0x00007FFCDD71E0F0 0x000000AAD072ECD0 0x000000AAD072ECD0 0x0000000000000000),
cv::dnn::Net::Impl::forwardLayer'::
1'::catch$0() + 0x83 bytes(s), e:\opencv3.2.0_sources\3.2.0\opencv_contrib-3.2.0\modules\dnn\src\dnn.cpp, line 423 + 0x75 byte(s)0x00007FFCF5F7C720 (0x00007FFCDD71E0F0 0x000000AAD071D1A8 0x0000000000000100 0x0000000000000000), __C_specific_handler() + 0x230 bytes(s)
0x00007FFCF5F72AE2 (0x0000000000000000 0x0000000000000000 0x000000AAD071E250 0x0000000000000000), __FrameUnwindFilter() + 0x432 bytes(s)
0x00007FFD1B94A193 (0x0000021CEA99E8B0 0x0000021CEAADBE08 0x0000021CE832FFE0 0x0000021C8222F7F0), RtlCaptureContext() + 0x3C3 bytes(s)
0x00007FFCDD601006 (0x0000021CEAADB720 0x0000021CEAADB748 0x0000000000000001 0x0000021CE8330008), cv::dnn::Net::Impl::forwardLayer() + 0x156 bytes(s), e:\opencv3.2.0_sources\3.2.0\opencv_contrib-3.2.0\modules\dnn\src\dnn.cpp, line 419 + 0x1B byte(s)
0x00007FFCDD600E4F (0x0000000000000000 0x000000AAD072ED90 0x0000021CE828CE70 0x0000021CE832FFE0), cv::dnn::Net::Impl::forwardAll() + 0x8F bytes(s), e:\opencv3.2.0_sources\3.2.0\opencv_contrib-3.2.0\modules\dnn\src\dnn.cpp, line 435
0x00007FFCDD600D7E (0x0000000000000046 0x000000AAD072EFA8 0x000000AAD072EEB0 0x0000000000000001), cv::dnn::Net::forward() + 0x9E bytes(s), e:\opencv3.2.0_sources\3.2.0\opencv_contrib-3.2.0\modules\dnn\src\dnn.cpp, line 503
0x00007FFCDD85CB5E (0x000000C3CD82EBAD 0x0000000000000001 0x00007FF679A68700 0x000000C3CD82EBAD), cv::gtr::TrackerGOTURNImpl::updateImpl() + 0xA5E bytes(s), e:\opencv3.2.0_sources\3.2.0\opencv_contrib-3.2.0\modules\tracking\src\gtrtracker.cpp, line 170 + 0x31 byte(s)
0x00007FF679A61FFB (0x00007FFD18E169F8 0x0000000000000000 0x00007FFD18E16A08 0x0000000000000000), main() + 0x5FB bytes(s), e:\tracking_goturn\tracking_goturn\source.cpp, line 168 + 0x1B byte(s)
0x00007FF679A632E8 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), __scrt_common_main_seh() + 0x124 bytes(s), f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl, line 264 + 0x22 byte(s)
0x00007FFD1AC98364 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), BaseThreadInitThunk() + 0x14 bytes(s)
0x00007FFD1B9070D1 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), RtlUserThreadStart() + 0x21 bytes(s)
Not sure if there is a problem in my environment -_ i tried reverting builds to 3.1.0 , with no success. Or maybe I dont have the correct *.prototxt and *.caffemodel.
Am using the model and prototxt file given here :
https://github.com/opencv/opencv_extra/tree/c4219d5eb3105ed8e634278fad312a1a8d2c182d/testdata/tracking
Let me know what you guys think !
Steps to reproduce
The text was updated successfully, but these errors were encountered: