/** * @file LabeledFileList.h * @brief reads images from directory * @author Erik Rodner * @date 17.09.2007 */ #ifndef LabeledFileListINCLUDE #define LabeledFileListINCLUDE #include #include "core/basics/Config.h" #include "vislearning/baselib/ProgressBar.h" #include "ClassNames.h" #include "LocalizationResult.h" #include "LabeledSet.h" #include "LabeledSetFactory.h" namespace OBJREC { /** * @brief reads images from directory */ class LabeledFileList { private: bool debug_dataset; LabeledSetFactory *m_pLabeledSetFactory; public: /** simple constructor */ LabeledFileList(); /** simple destructor */ virtual ~LabeledFileList(); LocalizationResult *getLocalizationInfo ( const ClassNames & classnames, int classno, const std::string & file, const NICE::Config & conf ) const; /** * @brief extract multiple label information from different sources. * * Different sources specified in the logfile under section "main": *-"pattern"
*-"filelist"
*-"factoryxml"
* xml file whose information is extracted and inserted into a LabeledSet. In order to use the right xml loader, a factory had to be provided * ( ::setFactory() ). [Johannes Ruehle] * @see LabeledSetFactory */ int getClassFromNumber( const std::string & lfile, const int exampleID ) const; void get ( const std::string & dir, const NICE::Config & datasetconf, const ClassNames & classnames, LabeledSet & ls, bool localizationInfoDisabled = false, bool debugDataset = false ); void getFromPattern ( const std::string & dir, const NICE::Config & datasetconf, const ClassNames & classnames, LabeledSet & ls, bool localizationInfoDisabled = false ) const; void getFromList ( const std::string & filelist, const NICE::Config & datasetconf, const ClassNames & classnames, LabeledSet & ls, bool localizationInfoDisabled = false ) const; void setFactory(LabeledSetFactory *pLabeledSetFactory) { m_pLabeledSetFactory = pLabeledSetFactory; } }; } // namespace #endif