Open leicao-me opened 6 years ago
No one experience the same error?
You should add your code:
check rotation of smartphone or videostream (I don't know how to do this) - and set this values rotation_is_required=1
or 0
then rotate each frame, to do it, between these 2 lines: https://github.com/AlexeyAB/darknet/blob/08e8e0c8c2d3cddfb6ee065e813ae5023f9568d2/src/http_stream.cpp#L240-L241 add this code:
int rotation_is_required = 1;
if (rotation_is_required) {
cv::Mat dst;
//cv::flip(frame.t(), dst, 1); // clockwise 90 degree rotation
cv::flip(frame.t(), dst, 0); // counter-clockwise 90 degree rotation
frame = dst;
}
The output video from iPhone "vertical" video (height > width) inputs will be rotated by 90 degrees counter-clockwise by Darknet automatically. Thus, the detection works very bad on the rotated videos.
Note:
Is there a way to auto-detect such videos and rotate them in the darknet, or can someone provide a workaround solution, please?
One can test this problem by visiting my project website and upload a vertical video from your iPhone: http://objectdetect.pro
Please upload videos with no potential privacy issues. You can overwrite your previous video by uploading a new video. Previous videos are not saved in the server.
Thank you