|
@@ -1,4 +1,4 @@
|
|
-/**
|
|
|
|
|
|
+/**
|
|
* @file LabeledFileList.cpp
|
|
* @file LabeledFileList.cpp
|
|
* @brief reads images from directory
|
|
* @brief reads images from directory
|
|
* @author Erik Rodner
|
|
* @author Erik Rodner
|
|
@@ -32,6 +32,18 @@ LabeledFileList::~LabeledFileList()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * @brief Loads the label information according to a given label file format.
|
|
|
|
+ *
|
|
|
|
+ * Supported types of label file format (localization_format):
|
|
|
|
+ * - "image": <br>usage of a single channel images containing label regions
|
|
|
|
+ * - "imagergb": <br>usage of a multi channel color images containing label regions
|
|
|
|
+ * - "polygon": <br>obtaining bounding boxes from textural label files (used with e.g. PASCAL dataset)
|
|
|
|
+ * - "imagelabeler": <br>obtaining label information (currently only bounding boxes) from the separate label files (XML like) created with the ImageLabeler ( < file name >_labeled.dat ). @see ImageInfo
|
|
|
|
+ *
|
|
|
|
+ * @param classnames class containing all potential class names (label categories)
|
|
|
|
+ * @param conf configuration structure containing a information from a loaded config file; has to tag "localization_format" in section "main" in order to obtain the correct label information from a file.
|
|
|
|
+ */
|
|
LocalizationResult *LabeledFileList::getLocalizationInfo ( const ClassNames & classnames,
|
|
LocalizationResult *LabeledFileList::getLocalizationInfo ( const ClassNames & classnames,
|
|
int classno,
|
|
int classno,
|
|
const std::string & file,
|
|
const std::string & file,
|
|
@@ -97,7 +109,14 @@ LocalizationResult *LabeledFileList::getLocalizationInfo ( const ClassNames & cl
|
|
|
|
|
|
if ( debug_dataset )
|
|
if ( debug_dataset )
|
|
fprintf (stderr, "LabeledFileList: object localization %d\n", (int)lr->size() );
|
|
fprintf (stderr, "LabeledFileList: object localization %d\n", (int)lr->size() );
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ else if ( format == "imagelabeler" ) {
|
|
|
|
+
|
|
|
|
+ lr = new LocalizationResult ( &classnames );
|
|
|
|
+ lr->loadImageInfo(lfile);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
fthrow(Exception, "Localization format not yet supported !!\n");
|
|
fthrow(Exception, "Localization format not yet supported !!\n");
|
|
}
|
|
}
|
|
|
|
|