91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

不同的數(shù)據(jù)集給出的數(shù)據(jù)標(biāo)注格式可能不同,有的標(biāo)注格式使用的是一張圖對應(yīng)一個(gè)xml文件,有的代碼需要一個(gè)存儲(chǔ)數(shù)據(jù)的groundtruth.txt文件,代碼中使用tinyxml庫將這種批量的xml文件轉(zhuǎn)存到一個(gè)groundtruth.txt文件中。readme供小白使用,也可以作為tinyxml的學(xué)習(xí)參考。

資源截圖

代碼片段和文件信息

#include?
#include?l.h>
#include?
#include?
#include?
#include?
#include?
#include?
#include?

using?namespace?std;


class?bound
{
public:
??string?tmp;
??int?xmin;
??int?xmax;
??int?ymin;
??int?ymax;
};

int?main()
{
??string?filepath?=?“/home/nvidia/Videos/s_video/“;
//??string?sequence;
//??cin?>>?sequence;
??string?filename?=?“/1(“;
??string?suffix?=?“).xml“;

??string?frame_num;
??string?read_path;
?
??TixmlDocument?*pdoc?=?new?TixmlDocument();
??TixmlElement*?prootElem;
??TixmlElement*?psize;
??TixmlElement*?preadsize;
??TixmlElement*?pbndbox;
??TixmlElement*?preadbox;
??
??bound?objbox;
??int?widthheight;
??string?strwidth;?
??string?strheight;
??
??ofstream?groundtxt(“../groundtruth.txt“);
??
??
??for(int?framecount=0;;framecount++)
??{

????frame_num?=?to_string(framecount);
????read_path?=?filepath+sequence+filename+frame_num+suffix;
??
????if(!pdoc->LoadFile(read_path.c_str()))
????{
??????printf(?“Could?not?load?example?xml?file?%s.?Error=‘%s‘\n“?read_path.c_str()pdoc->ErrorDesc());
??????printf(“frame?num:%d\n“framecount);
??????return?0;
????}
??
????prootElem?=?pdoc->RootElement();

?//read?size
????psize?=?prootElem->FirstChildElement(“size“);
????
????preadsize?=?psize->FirstChildElement(“width“);
????strwidth?=?preadsize->GetText();
????preadsize?=?psize?->FirstChildElement(“height“);
????strheight?=?preadsize->GetText();
????width?=?atoi(strwidth.c_str());
????height?=?atoi(strheight.c_str());
????
//?????cout<<“width*height:“<????
????
????//read?box
????pbndbox?=?prootElem?->FirstChildElement(“object“);
????pbndbox?=?pbndbox?->FirstChildElement(“bndbox“);
????
????preadbox?=?pbndbox->FirstChildElement(“xmin“);
????objbox.tmp?=?preadbox->GetText();
????objbox.xmin?=?atoi(objbox.tmp.c_str());
????
????preadbox?=?pbndbox->FirstChildElement(“xmax“);
????objbox.tmp?=?preadbox->GetText();
????objbox.xmax?=?atoi(objbox.tmp.c_str());
????
????preadbox?=?pbndbox->FirstChildElement(“ymin“);
????objbox.tmp?=?preadbox->GetText();
????objbox.ymin?=?atoi(objbox.tmp.c_str());
????
????preadbox?=?pbndbox->FirstChildElement(“ymax“);
????objbox.tmp?=?preadbox->GetText();
????objbox.ymax?=?atoi(objbox.tmp.c_str());
????
????groundtxt<????
????
????
??}
??
??return?0;
}





?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-04-10?11:15??xml2groundtruth\
?????文件??????184162??2019-04-10?01:10??xml2groundtruth\libtinyxml.a
?????文件????????2407??2019-04-10?11:09??xml2groundtruth\main.cpp
?????文件???????????0??2019-04-10?10:55??xml2groundtruth\groundtruth.txt
?????文件??????210124??2019-04-10?01:02??xml2groundtruth\tinyxml_2_6_2.tar.gz
?????文件?????????315??2018-02-16?23:50??xml2groundtruth\1(0).xml
?????文件?????????412??2019-04-10?07:37??xml2groundtruth\CMakeLists.txt
?????文件?????????865??2019-04-10?11:15??xml2groundtruth\readme.md
?????目錄???????????0??2019-04-10?11:13??xml2groundtruth\build\
?????目錄???????????0??2019-04-10?11:02??xml2groundtruth\tinyxml_makefile\
?????文件????????3651??2019-04-10?01:09??xml2groundtruth\tinyxml_makefile\Makefile

評論

共有 條評論