PetaVision  Alpha
FilenameParsingGroundTruthLayer.hpp
1 /*
2  * FilenameParsingGroundTruthLayer.hpp
3  *
4  * Created on: Nov 10, 2014
5  * Author: wchavez
6  */
7 #ifndef FILENAMEPARSINGGROUNDTRUTHLAYER_HPP_
8 #define FILENAMEPARSINGGROUNDTRUTHLAYER_HPP_
9 
10 #include "HyPerLayer.hpp"
11 #include "InputLayer.hpp"
12 #include <string>
13 
14 namespace PV {
15 
17 
18  public:
19  FilenameParsingGroundTruthLayer(const char *name, HyPerCol *hc);
21  virtual Response::Status
22  communicateInitInfo(std::shared_ptr<CommunicateInitInfoMessage const> message) override;
23  virtual Response::Status updateState(double timef, double dt) override;
24  virtual bool needUpdate(double time, double dt) override;
25  int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override;
26 
27  private:
28  std::vector<std::string> mClasses;
29  char *mInputLayerName = nullptr;
30  char *mClassListFileName = nullptr;
31  InputLayer *mInputLayer = nullptr;
32  float mGtClassTrueValue = 1.0f;
33  float mGtClassFalseValue = 0.0f;
34 
35  protected:
36  virtual Response::Status registerData(Checkpointer *checkpointer) override;
37 
56  virtual void ioParam_classList(enum ParamsIOFlag ioFlag);
57 
63  virtual void ioParam_inputLayerName(enum ParamsIOFlag ioFlag);
64 
71  virtual void ioParam_gtClassTrueValue(enum ParamsIOFlag ioFlag);
72 
78  virtual void ioParam_gtClassFalseValue(enum ParamsIOFlag ioFlag);
79 
81 };
82 }
83 
84 #endif // FILENAMEPARSINGGROUNDTRUTHLAYER_HPP_
int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override
virtual void ioParam_gtClassFalseValue(enum ParamsIOFlag ioFlag)
gtClassFalseValue: defines value to be set for the neurons that do not match the classes.txt classifer
virtual bool needUpdate(double time, double dt) override
virtual void ioParam_gtClassTrueValue(enum ParamsIOFlag ioFlag)
gtClassTrueValue: defines value to be set for the neuron that matches classes.txt classifer ...
virtual void ioParam_inputLayerName(enum ParamsIOFlag ioFlag)
movieLayerName: lists name of the movie layer from which the imageListPath is used to parse the class...
virtual void ioParam_classList(enum ParamsIOFlag ioFlag)
clasList: path to the .txt file that holds the list of imageListPath features that will parse to diff...