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

  • 大小: 11.21MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2023-07-16
  • 語言: 其他
  • 標(biāo)簽: FDDB??

資源簡介

資源中是通過加載自己的權(quán)值和框架框出人臉,同時讀取FDDB的標(biāo)簽將標(biāo)準(zhǔn)人臉還原出來,通過IOU來判斷自己的框架是否框?qū)θ四槪詈笥嬎銣?zhǔn)確率

資源截圖

代碼片段和文件信息

#include“opencv2/opencv.hpp“
#include?“opencv2/highgui/highgui.hpp“
#include“opencv2/imgproc/imgproc.hpp“
#include?“opencv2/core/core.hpp“
#include“iostream“
#include???
using?namespace?std;
using?namespace?cv;
using?namespace?cv::dnn;

const?size_t?inWidth?=?300;
const?size_t?inHeight?=?300;
const?double?inScaleFactor?=?1.0;
const?Scalar?meanVal(104.0?177.0?123.0);

template?
Type?stringToNum(const?string&?str)
{
istringstream?iss(str);
Type?num;
iss?>>?num;
return?num;
}
vector?FDDB;
vector?OPENCV;
vector?Right;
vector?False;

float?iou(Rect?&OPENCV?Rect?&FDDB)
{
int?x1?=?OPENCV.x;
int?y1?=?OPENCV.y;
int?w1?=?OPENCV.width;
int?h1?=?OPENCV.height;
int?x2?=?FDDB.x;
int?y2?=?FDDB.y;
int?w2?=?FDDB.width;
int?h2?=?FDDB.height;
if?(x1?+?w2?<=?x2?||?x2?+?w2?<=?x1||y1+h1<=y2||y2+h2<=y1)
return?0;
int?startx?=?(x2?-?x1)>0???x2?:?x1;
int?endx?=?((x2+w2)?-?(x1+w1))>0???(x1?+?w1)?:?(x2?+?w2);
int?starty?=?(y2?-?y1)>0???y2?:?y1;
int?endy?=?((y2+h2)-(y1+h1))>0???(y1?+?h1)?:?(y2?+?h2);
int?s1?=?(endx?-?startx)*(endy?-?starty);
int?s2?=?w1*h1?+?w2*h2?-?s1;
float?IOU?=?s1*1.0?/?s2*1.0;
return?IOU;
}
int?main()
{
int?g?=?2;
String?modelConfiguration?=?“D://face_dectect//deploy_opencv.prototxt“;
String?modelBinary?=?“D://face_dectect//face_opencv.caffemodel“;
dnn::Net?net?=?readNetFromCaffe(modelConfiguration?modelBinary);
int?a=0p=0;
Rect?fddb;
Mat?srcdst1grayframe;
string?imgNamelist;
ifstream?start(“D://face_dectect//FDDB//pos.txt“);
for(int?i=0;getline(startlist);i++)
{?
ifstream?fineNeg(“D://face_dectect//FDDB//“+list);
for?(int?num?=?0;?getline(fineNeg?imgName);?num++)
{
p++;
if?(p?%?100?==?0)
cout?< string?n?=?imgName;
if?(n.length()?>=?21?&&?n.length()?<=?26)
{
OPENCV.clear();
g?=?1;
string?Path?=?“D://face_dectect//“?+?imgName?+?“.jpg“;
src?=?imread(Path);
dst1?=?imread(Path);
frame?=?imread(Path);
if?(src.empty())
{
cout?< return?0;
}
??}
????if?(n.length()?==?1)
????{
a?=?atoi(n.c_str());
????}
int?q?=?0;
if?(n.length()?>=?51)
{
Mat?dst?=?dst1;
for?(int?i?=?0;?i? {
for?(int?j?=?0;?j? {
Vec3b?pixel1;
pixel1[0]?=?0;
pixel1[1]?=?0;
pixel1[2]?=?0;
dst.at(i?j)?=?pixel1;
}
}
FDDB.clear();
istringstream?strcin(n);
string?s;
vector?vs;
while?(strcin?>>?s)
vs.push_back(s);
double?b?=?atof(vs[0].c_str());
double?h?=?atof(vs[1].c_str());
double?d?=?atof(vs[2].c_str());
double?e?=?atof(vs[3].c_str());
double?f?=?atof(vs[4].c_str());
ellipse(dst?Point(e?f)?Size(b?h)?d?*?180?/?3.14?0?360?cv::Scalar(255?255?255)?1);
if

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-03-09?08:17??rectangle\
?????目錄???????????0??2019-02-25?01:28??rectangle\.vs\
?????目錄???????????0??2019-02-25?01:28??rectangle\.vs\rectangle\
?????目錄???????????0??2019-02-25?01:28??rectangle\.vs\rectangle\v14\
?????文件???????29696??2019-03-09?08:17??rectangle\.vs\rectangle\v14\.suo
?????目錄???????????0??2019-02-25?03:26??rectangle\Debug\
?????文件???????61440??2019-02-25?03:26??rectangle\Debug\rectangle.pdb
?????文件????????5681??2019-02-27?06:25??rectangle\main.cpp
?????目錄???????????0??2019-03-09?08:17??rectangle\rectangle\
?????目錄???????????0??2019-02-25?03:26??rectangle\rectangle\Debug\
?????文件??????680114??2019-02-25?03:26??rectangle\rectangle\Debug\main.obj
?????文件?????????512??2019-02-25?03:26??rectangle\rectangle\Debug\rectangle.log
?????目錄???????????0??2019-02-25?03:26??rectangle\rectangle\Debug\rectangle.tlog\
?????文件?????????626??2019-02-25?03:26??rectangle\rectangle\Debug\rectangle.tlog\CL.command.1.tlog
?????文件???????26860??2019-02-25?03:26??rectangle\rectangle\Debug\rectangle.tlog\CL.read.1.tlog
?????文件?????????420??2019-02-25?03:26??rectangle\rectangle\Debug\rectangle.tlog\CL.write.1.tlog
?????文件???????????2??2019-02-25?03:26??rectangle\rectangle\Debug\rectangle.tlog\link-cvtres.read.1.tlog
?????文件???????????2??2019-02-25?03:26??rectangle\rectangle\Debug\rectangle.tlog\link-cvtres.write.1.tlog
?????文件???????????2??2019-02-25?03:26??rectangle\rectangle\Debug\rectangle.tlog\link-rc.read.1.tlog
?????文件???????????2??2019-02-25?03:26??rectangle\rectangle\Debug\rectangle.tlog\link-rc.write.1.tlog
?????文件???????????2??2019-02-25?03:26??rectangle\rectangle\Debug\rectangle.tlog\link.command.1.tlog
?????文件???????????2??2019-02-25?03:26??rectangle\rectangle\Debug\rectangle.tlog\link.read.1.tlog
?????文件???????????2??2019-02-25?03:26??rectangle\rectangle\Debug\rectangle.tlog\link.write.1.tlog
?????文件?????????193??2019-02-25?03:26??rectangle\rectangle\Debug\rectangle.tlog\rectangle.lastbuildstate
?????文件???????????0??2019-02-25?03:26??rectangle\rectangle\Debug\rectangle.tlog\unsuccessfulbuild
?????文件?????1100800??2019-02-25?03:26??rectangle\rectangle\Debug\vc140.idb
?????文件?????2183168??2019-02-25?03:26??rectangle\rectangle\Debug\vc140.pdb
?????文件????????5683??2019-03-09?08:17??rectangle\rectangle\main.cpp
?????文件????????3911??2019-03-01?05:02??rectangle\rectangle\main1.cpp
?????文件??????169947??2019-03-01?03:53??rectangle\rectangle\problem.txt
?????文件????????7735??2019-02-27?01:40??rectangle\rectangle\rectangle.vcxproj
............此處省略24個文件信息

評論

共有 條評論

相關(guān)資源