コード例 #1
0
        /*! @brief configure the detector state
         *
         * The configure method is called once when the ECTO cell is launched,
         * and is designed to initialise the detector state and load models,
         * parameters, etc.
         *
         * @param params the parameters made available through the config file and
         * python bindings
         * @param inputs for initializing inputs, if necessary
         * @param outputs for initializing outputs, if necessary
         */
        void
        configure(const tendrils& params, const tendrils& inputs, const tendrils& outputs) {

            // create the model object and deserialize it
            FileStorageModel model;
            model.deserialize(*model_file_);

            // create the visualizer
            visualizer_.reset(new Visualize(model.name()));

            // create the PartsBasedDetector and distribute the model parameters
            detector_.reset(new PartsBasedDetector<float>);
            detector_->distributeModel(model);
        }
コード例 #2
0
	/*! @brief configure the detector state
	 *
	 * The configure method is called once when the ECTO cell is launched,
	 * and is designed to initialise the detector state and load models,
	 * parameters, etc.
	 *
	 * @param params the parameters made available through the config file and
	 * python bindings
	 * @param inputs for initializing inputs, if necessary
	 * @param outputs for initializing outputs, if necessary
	 */
	void configure(const tendrils& params, const tendrils& inputs,
			const tendrils& outputs)
	{

		std::cout << "MODEL: " << *model_file_ << std::endl;
		// create the model object and deserialize it
		FileStorageModel model;
		model.deserialize(*model_file_);

		// create the visualizer
		visualizer_.reset(new Visualize(model.name()));

		// create the PartsBasedDetector and distribute the model parameters
		detector_.reset(new PartsBasedDetector<double>);
		detector_->distributeModel(model);

		// set the model_name
		model_name_ = model.name();
	}