| 233 | } |
| 234 | |
| 235 | void Detector::LoadWeight(std::string weight_path) { |
| 236 | try |
| 237 | { |
| 238 | torch::load(detector, weight_path); |
| 239 | } |
| 240 | catch (const std::exception& e) |
| 241 | { |
| 242 | std::cout << e.what(); |
| 243 | } |
| 244 | detector->to(device); |
| 245 | detector->eval(); |
| 246 | return; |
| 247 | } |
| 248 | |
| 249 | void show_bbox(cv::Mat image, torch::Tensor bboxes, std::vector<std::string> name_list) { |
| 250 | //���û����ı�����ز��� |