Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
13e9e3ee
Commit
13e9e3ee
authored
Mar 21, 2012
by
Davis King
Browse files
minor cleanup
parent
cb4a354e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
12 deletions
+19
-12
dlib/data_io/load_image_dataset.h
dlib/data_io/load_image_dataset.h
+4
-1
dlib/data_io/load_image_dataset_abstract.h
dlib/data_io/load_image_dataset_abstract.h
+15
-11
No files found.
dlib/data_io/load_image_dataset.h
View file @
13e9e3ee
...
@@ -67,7 +67,10 @@ namespace dlib
...
@@ -67,7 +67,10 @@ namespace dlib
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template
<
typename
image_type
,
typename
MM
>
template
<
typename
image_type
,
typename
MM
>
void
load_image_dataset
(
void
load_image_dataset
(
array
<
image_type
,
MM
>&
images
,
array
<
image_type
,
MM
>&
images
,
std
::
vector
<
std
::
vector
<
rectangle
>
>&
object_locations
,
std
::
vector
<
std
::
vector
<
rectangle
>
>&
object_locations
,
...
...
dlib/data_io/load_image_dataset_abstract.h
View file @
13e9e3ee
...
@@ -3,15 +3,10 @@
...
@@ -3,15 +3,10 @@
#undef DLIB_LOAD_IMAGE_DaTASET_ABSTRACT_H__
#undef DLIB_LOAD_IMAGE_DaTASET_ABSTRACT_H__
#ifdef DLIB_LOAD_IMAGE_DaTASET_ABSTRACT_H__
#ifdef DLIB_LOAD_IMAGE_DaTASET_ABSTRACT_H__
#include "load_image_dataset.h"
#include "image_dataset_metadata.h"
#include "../misc_api.h"
#include "../array/array_kernel_abstract.h"
#include "../dir_nav.h"
#include "../image_io.h"
#include "../array.h"
#include <vector>
#include "../geometry.h"
#include "../image_dataset_metadata.h"
#include <string>
#include <string>
#include <vector>
namespace
dlib
namespace
dlib
...
@@ -30,13 +25,16 @@ namespace dlib
...
@@ -30,13 +25,16 @@ namespace dlib
const
std
::
string
&
label
const
std
::
string
&
label
);
);
/*!
/*!
requires
- image_type == is an implementation of array2d/array2d_kernel_abstract.h
- pixel_traits<typename image_type::type> is defined
ensures
ensures
- This routine loads the images and their associated object boxes from
- This routine loads the images and their associated object boxes from
the image metadata file indicated by filename. This metadata file
the image metadata file indicated by filename. This metadata file
should be in the XML format used by the save_image_dataset_metadata()
should be in the XML format used by the save_image_dataset_metadata()
routine.
routine.
- #images.size() == the number of images in the metadata file
- #images.size() == the number of images in the metadata file
- #images.size() == object_locations.size()
- #images.size() ==
#
object_locations.size()
- This routine is capable of loading any image format which can be read
- This routine is capable of loading any image format which can be read
by the load_image() routine.
by the load_image() routine.
- for all valid i:
- for all valid i:
...
@@ -46,18 +44,24 @@ namespace dlib
...
@@ -46,18 +44,24 @@ namespace dlib
- if (labels != "") then
- if (labels != "") then
- only boxes with the given label will be loaded into object_locations.
- only boxes with the given label will be loaded into object_locations.
- else
- else
- all boxes in the dataset will be loaded into object_locations
- all boxes in the dataset will be loaded into object_locations
.
!*/
!*/
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template
<
typename
image_type
,
typename
MM
>
template
<
typename
image_type
,
typename
MM
>
void
load_image_dataset
(
void
load_image_dataset
(
array
<
image_type
,
MM
>&
images
,
array
<
image_type
,
MM
>&
images
,
std
::
vector
<
std
::
vector
<
rectangle
>
>&
object_locations
,
std
::
vector
<
std
::
vector
<
rectangle
>
>&
object_locations
,
const
std
::
string
&
filename
const
std
::
string
&
filename
);
);
/*!
/*!
requires
- image_type == is an implementation of array2d/array2d_kernel_abstract.h
- pixel_traits<typename image_type::type> is defined
ensures
ensures
- performs: load_image_dataset(images, object_locations, filename, "");
- performs: load_image_dataset(images, object_locations, filename, "");
(i.e. it ignores box labels and therefore loads all the boxes in the dataset)
(i.e. it ignores box labels and therefore loads all the boxes in the dataset)
...
...
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