123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- /**
- * @file LabeledFileList.h
- * @brief reads images from directory
- * @author Erik Rodner
- * @date 17.09.2007
- */
- #ifndef LabeledFileListINCLUDE
- #define LabeledFileListINCLUDE
- #include <string>
- #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" <br>
- *-"filelist" <br>
- *-"factoryxml" <br>
- * 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
|