Skip to content

Commit

Permalink
Optim: model valid order (#58)
Browse files Browse the repository at this point in the history
* Add: nvidia algo register

* Add: nvidia object detection algo

* Optim: model valid

* Optim: model valid order

* Optim: model valid order
  • Loading branch information
mjq2020 committed Mar 27, 2024
1 parent 920f645 commit aa4850f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions core/algorithm/el_algorithm_delegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@ namespace utility {

// Note: the order index influences the algorthm type in current implementation
el_algorithm_type_t el_algorithm_type_from_engine(const Engine* engine) {
#ifdef _EL_ALGORITHM_YOLO_H_ // index 1
if (AlgorithmYOLO::is_model_valid(engine)) return EL_ALGO_TYPE_YOLO;
#ifdef _EL_ALGORITHM_YOLO_POSE_H_ // index 5
if (AlgorithmYOLOPOSE::is_model_valid(engine)) return EL_ALGO_TYPE_YOLO_POSE;
#endif
#ifdef _EL_ALGORITHM_YOLO_V8_H_ // index 6
#ifdef _EL_ALGORITHM_YOLO_V8_H_ // index 6
if (AlgorithmYOLOV8::is_model_valid(engine)) return EL_ALGO_TYPE_YOLO_V8;
#endif
#ifdef _EL_ALGORITHM_YOLO_POSE_H_ // index 5
if (AlgorithmYOLOPOSE::is_model_valid(engine)) return EL_ALGO_TYPE_YOLO_POSE;
#ifdef _EL_ALGORITHM_NVIDIA_DET_H_
if (AlgorithmNvidiaDet::is_model_valid(engine)) return EL_ALGO_TYPE_NVIDIA_DET;
#endif
#ifdef _EL_ALGORITHM_YOLO_H_ // index 1
if (AlgorithmYOLO::is_model_valid(engine)) return EL_ALGO_TYPE_YOLO;
#endif
#ifdef _EL_ALGORITHM_FOMO_H_ // index 2
if (AlgorithmFOMO::is_model_valid(engine)) return EL_ALGO_TYPE_FOMO;
Expand All @@ -52,9 +55,6 @@ el_algorithm_type_t el_algorithm_type_from_engine(const Engine* engine) {
#endif
#ifdef _EL_ALGORITHM_PFLD_H_ // index 4
if (AlgorithmPFLD::is_model_valid(engine)) return EL_ALGO_TYPE_PFLD;
#endif
#ifdef _EL_ALGORITHM_NVIDIA_DET_H_
if (AlgorithmNvidiaDet::is_model_valid(engine)) return EL_ALGO_TYPE_NVIDIA_DET;
#endif
return EL_ALGO_TYPE_UNDEFINED;
}
Expand Down

0 comments on commit aa4850f

Please sign in to comment.