提交 ef4edde0 authored 作者: blu's avatar blu

yolo

上级 393e1e39
*/5 * * * * sync; echo 1 > /proc/sys/vm/drop_caches
\ No newline at end of file
#include <sys/statvfs.h>
#include <iostream>
#include <string>
using namespace std;
double getDiskAvailPercent(string path) {
struct statvfs fiData;
if((statvfs(path.c_str(),&fiData)) < 0 ) {
} else {
double fper = fiData.f_bavail/double(fiData.f_blocks);
cout << fper << endl;
return fper;
}
return -1;
}
int main( int argc, char *argv[] )
{
struct statvfs fiData;
if( argc < 2 ) {
cout <<"Usage, ./size dir1 dir2 ... dirN\n";
return(1);
}
//Lets loopyloop through the argvs
for( int i= 1 ; i<argc; i++ ) {
getDiskAvailPercent(argv[i]);
}
}
\ No newline at end of file
......@@ -201,7 +201,6 @@ public:
int process(string inVideoUri, callback cb = nullptr, string outFile = "processed.jpg")
{
if(inVideoUri.empty()) {
inVideoUri = "0";
}
......@@ -230,7 +229,7 @@ public:
spdlog::info("{} try to process video {} to {}", selfId, inVideoUri, outFile);
long frameCnt = 0;
long detCnt = 0;
long detCnt = 0, skipCnt = 0;
Mat frame, outFrame;
while (waitKey(1) < 0) {
// get frame from the video
......@@ -249,11 +248,14 @@ public:
if (frame.empty()) {
continue;
}
vector<tuple<string, double, Rect>> ret = process(frame, outFrame);
if(ret.size() == 0 && bOutputIsImg) {
// no detection
spdlog::info("{} no valid object detected skip saving image", selfId);
if(skipCnt % 100 == 0) {
spdlog::info("{} no valid object detected skipped frame count {}", selfId, skipCnt);
}
skipCnt++;
continue;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论