Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
D
datang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaoyunfei
datang
Commits
ad865bfd
Commit
ad865bfd
authored
Feb 23, 2021
by
wanghailong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改yolo中命名,减少命名冲突
parent
f772ebb4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
api.cpp
yolov3/modules/api.cpp
+3
-3
class_detector.cpp
yolov3/modules/class_detector.cpp
+5
-5
class_detector.h
yolov3/modules/class_detector.h
+5
-5
No files found.
yolov3/modules/api.cpp
View file @
ad865bfd
...
...
@@ -9,10 +9,10 @@
#include <unistd.h>
#include <sys/time.h>
Detector
*
detector
;
Object
Detector
*
detector
;
void
InitCnrt
(
bool
useConfig
,
Config
&
models_config
)
{
detector
=
new
Detector
;
detector
=
new
ObjectDetector
()
;
Config
config_v3
;
config_v3
.
net_type
=
YOLOV3
;
...
...
@@ -154,6 +154,6 @@ void inference(std::map<int,Results*>* results_map,vector<cv::Mat>* input_mats)
gettimeofday
(
&
end
,
NULL
);
time
=
(
1000000
*
(
end
.
tv_sec
-
start
.
tv_sec
)
+
end
.
tv_usec
-
start
.
tv_usec
)
/
(
1000.0
);
cout
<<
"total time = "
<<
time
<<
"ms"
<<
endl
;
//
cout << "total time = " << time << "ms" << endl;
}
yolov3/modules/class_detector.cpp
View file @
ad865bfd
#include "class_detector.h"
#include "class_yolo_detector.hpp"
class
Detector
::
Impl
class
Object
Detector
::
Impl
{
public
:
Impl
()
{}
...
...
@@ -11,12 +11,12 @@ public:
YoloDectector
_detector
;
};
Detector
::
Detector
()
ObjectDetector
::
Object
Detector
()
{
_impl
=
new
Impl
();
}
Detector
::~
Detector
()
ObjectDetector
::~
Object
Detector
()
{
if
(
_impl
)
{
...
...
@@ -25,12 +25,12 @@ Detector::~Detector()
}
}
void
Detector
::
init
(
const
Config
&
config
)
void
Object
Detector
::
init
(
const
Config
&
config
)
{
_impl
->
_detector
.
init
(
config
);
}
void
Detector
::
detect
(
const
std
::
vector
<
cv
::
Mat
>
&
mat_image
,
std
::
vector
<
BatchResult
>
&
vec_batch_result
)
void
Object
Detector
::
detect
(
const
std
::
vector
<
cv
::
Mat
>
&
mat_image
,
std
::
vector
<
BatchResult
>
&
vec_batch_result
)
{
_impl
->
_detector
.
detect
(
mat_image
,
vec_batch_result
);
}
yolov3/modules/class_detector.h
View file @
ad865bfd
...
...
@@ -52,12 +52,12 @@ struct Config
};
class
API
Detector
class
API
Object
Detector
{
public
:
explicit
Detector
();
explicit
Object
Detector
();
~
Detector
();
~
Object
Detector
();
void
init
(
const
Config
&
config
);
...
...
@@ -65,8 +65,8 @@ public:
private
:
Detector
(
const
Detector
&
);
const
Detector
&
operator
=
(
const
Detector
&
);
ObjectDetector
(
const
Object
Detector
&
);
const
ObjectDetector
&
operator
=
(
const
Object
Detector
&
);
class
Impl
;
Impl
*
_impl
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment