// Copyright chenyy 2026. Licensed under the MIT License.
//
// Detection modes for armor_yolo_detect
//
// Copyright (C) FYT Vision Group. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef ARMOR_YOLO_DETECT_DETECTOR_MODE_HPP_
#define ARMOR_YOLO_DETECT_DETECTOR_MODE_HPP_

namespace armor_yolo_detect {

// Detection modes
enum class DetectorMode {
  // Original hybrid detection: YOLO runs every frame
  HYBRID_SYNC = 0,
  // ROI cache mode: YOLO runs every N frames, detection runs every frame
  HYBRID_ROI_CACHE = 1,
  // Async mode: async queue with ROI cache
  HYBRID_ASYNC = 2
};

inline std::string detectorModeToString(DetectorMode mode) {
  switch (mode) {
    case DetectorMode::HYBRID_SYNC:
      return "hybrid_sync";
    case DetectorMode::HYBRID_ROI_CACHE:
      return "hybrid_roi_cache";
    case DetectorMode::HYBRID_ASYNC:
      return "hybrid_async";
    default:
      return "unknown";
  }
}

}  // namespace armor_yolo_detect

#endif  // ARMOR_YOLO_DETECT_DETECTOR_MODE_HPP_
