同步操作将从 ApolloAuto/apollo 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
The Evaluator generates features (from the raw information of obstacles and the ego vehicle) to get the model output by applying the pre-trained deep learning model.
Please follow the steps to add a new evaluator named NewEvaluator
.
Evaluator
NewEvaluator
Evaluator
Create a new file named new_evaluator.h
in the folder modules/prediction/evaluator/vehicle
. And define it like this:
#include "modules/prediction/evaluator/evaluator.h"
namespace apollo {
namespace prediction {
class NewEvaluator : public Evaluator {
public:
NewEvaluator();
virtual ~NewEvaluator();
void Evaluate(Obstacle* obstacle_ptr) override;
// Other useful functions and fields.
};
} // namespace prediction
} // namespace apollo
NewEvaluator
Create a new file named new_evaluator.cc
in the same folder as that of new_evaluator.h
. Implement it like this:
#include "modules/prediction/evaluator/vehicle/new_evaluator.h"
namespace apollo {
namespace prediction {
NewEvaluator::NewEvaluator() {
// Implement
}
NewEvaluator::~NewEvaluator() {
// Implement
}
NewEvaluator::Evaluate(Obstacle* obstacle_ptr)() {
// Extract features
// Compute new_output by applying pre-trained model
}
// Other functions
} // namespace prediction
} // namespace apollo
Add a new type of evaluator in prediction_conf.proto
:
enum EvaluatorType {
MLP_EVALUATOR = 0;
NEW_EVALUATOR = 1;
}
In the file modules/prediction/conf/prediction_conf.pb.txt
, update the field evaluator_type
like this:
obstacle_conf {
obstacle_type: VEHICLE
obstacle_status: ON_LANE
evaluator_type: NEW_EVALUATOR
predictor_type: NEW_PREDICTOR
}
Update CreateEvluator( ... )
like this:
case ObstacleConf::NEW_EVALUATOR: {
evaluator_ptr.reset(new NewEvaluator());
break;
}
Update RegisterEvaluators()
like this:
RegisterEvaluator(ObstacleConf::NEW_EVALUATOR);
After following the steps above, the new evaluator should be created.
If you would like to add new features, follow the instructions that follow:
Assume the new evaluating result named new_output
and also assume its type is int32
. If the output is related directly to the obstacles, you can add it into modules/prediction/proto/feature.proto
like this:
message Feature {
// Other existing features
optional int32 new_output = 1000;
}
If the output is related to the lane sequences, please add it into modules/prediction/proto/lane_graph.proto
like this:
message LaneSequence {
// Other existing features
optional int32 new_output = 1000;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。