Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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
submodule
opencv_contrib
Commits
9ace6338
Commit
9ace6338
authored
May 24, 2017
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1182 from sovrasov:dnn_build_wo_torch
parents
503b00f1
50a52424
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
43 deletions
+20
-43
caffe_importer.cpp
modules/dnn/src/caffe/caffe_importer.cpp
+1
-9
tf_importer.cpp
modules/dnn/src/tensorflow/tf_importer.cpp
+9
-17
torch_importer.cpp
modules/dnn/src/torch/torch_importer.cpp
+10
-17
No files found.
modules/dnn/src/caffe/caffe_importer.cpp
View file @
9ace6338
...
...
@@ -374,15 +374,7 @@ Ptr<Importer> cv::dnn::createCaffeImporter(const String&, const String&)
Net
cv
::
dnn
::
readNetFromCaffe
(
const
String
&
prototxt
,
const
String
&
caffeModel
/*= String()*/
)
{
Ptr
<
Importer
>
caffeImporter
;
try
{
caffeImporter
=
createCaffeImporter
(
prototxt
,
caffeModel
);
}
catch
(...)
{
}
Ptr
<
Importer
>
caffeImporter
=
createCaffeImporter
(
prototxt
,
caffeModel
);
Net
net
;
if
(
caffeImporter
)
caffeImporter
->
populateNet
(
net
);
...
...
modules/dnn/src/tensorflow/tf_importer.cpp
View file @
9ace6338
...
...
@@ -736,23 +736,6 @@ void TFImporter::populateNet(Net dstNet)
}
// namespace
Net
cv
::
dnn
::
readNetFromTensorflow
(
const
String
&
model
)
{
Ptr
<
Importer
>
importer
;
try
{
importer
=
createTensorflowImporter
(
model
);
}
catch
(...)
{
}
Net
net
;
if
(
importer
)
importer
->
populateNet
(
net
);
return
net
;
}
Ptr
<
Importer
>
cv
::
dnn
::
createTensorflowImporter
(
const
String
&
model
)
{
return
Ptr
<
Importer
>
(
new
TFImporter
(
model
.
c_str
()));
...
...
@@ -767,3 +750,12 @@ Ptr<Importer> cv::dnn::createTensorflowImporter(const String&)
}
#endif //HAVE_PROTOBUF
Net
cv
::
dnn
::
readNetFromTensorflow
(
const
String
&
model
)
{
Ptr
<
Importer
>
importer
=
createTensorflowImporter
(
model
);
Net
net
;
if
(
importer
)
importer
->
populateNet
(
net
);
return
net
;
}
modules/dnn/src/torch/torch_importer.cpp
View file @
9ace6338
...
...
@@ -971,23 +971,6 @@ Mat readTorchBlob(const String &filename, bool isBinary)
return
importer
->
tensors
.
begin
()
->
second
;
}
Net
readNetFromTorch
(
const
String
&
model
,
bool
isBinary
)
{
Ptr
<
Importer
>
importer
;
try
{
importer
=
createTorchImporter
(
model
,
isBinary
);
}
catch
(...)
{
}
Net
net
;
if
(
importer
)
importer
->
populateNet
(
net
);
return
net
;
}
#else
Ptr
<
Importer
>
createTorchImporter
(
const
String
&
,
bool
)
...
...
@@ -1003,5 +986,15 @@ Mat readTorchBlob(const String&, bool)
}
#endif //defined(ENABLE_TORCH_IMPORTER) && ENABLE_TORCH_IMPORTER
Net
readNetFromTorch
(
const
String
&
model
,
bool
isBinary
)
{
Ptr
<
Importer
>
importer
=
createTorchImporter
(
model
,
isBinary
);
Net
net
;
if
(
importer
)
importer
->
populateNet
(
net
);
return
net
;
}
}
}
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