Glencsa / YOLOv8-ORB-SLAM3

YOLOv8-ORB-SLAM3: Semantic SLAM with dynamic feature point removal
8 stars 1 forks source link

没法识别,没有yolo只有orb-slam3 #2

Open LUCKEYgirl opened 1 month ago

LUCKEYgirl commented 1 month ago

我将官网的yolov8n-seg.pt和yolov8s-seg.pt模型下载下来,使用如下代码生成yolov8n-seg.onnx和yolov8s-seg.onnx文件

from ultralytics import YOLO

# Load a model
model = YOLO("yolov8s-seg.pt")  # load an official model

# Export the model

model.export(format="onnx",opset=12)

分别替换掉 rgbd_tum.cc文件第77行 string model_path_seg = "/home/fast-drone/yolov8s-seg.onnx"; Frame.cc文件第226行 string model_path_seg = "/home/fast-drone/yolov8n-seg.onnx"; 编译后重新运行,使用TUM数据集 ./Examples_old/RGB-D/rgbd_tum_old Vocabulary/ORBvoc.txt Examples_old/RGB-D/TUM3.yaml ~/rgbd_dataset_freiburg3_sitting_static/ ~/rgbd_dataset_freiburg3_sitting_static/associations.txt image

微信图片_20240807092634

运行结果:./Examples_old/RGB-D/rgbd_tum_old Vocabulary/ORBvoc.txt Examples_old/RGB-D/TUM3.yaml ~/rgbd_dataset_freiburg3_sitting_static/ ~/rgbd_dataset_freiburg3_sitting_static/associations.txt

ORB-SLAM3 Copyright (C) 2017-2020 Carlos Campos, Richard Elvira, Juan J. Gómez, José M.M. Montiel and Juan D. Tardós, University of Zaragoza. ORB-SLAM2 Copyright (C) 2014-2016 Raúl Mur-Artal, José M.M. Montiel and Juan D. Tardós, University of Zaragoza. This program comes with ABSOLUTELY NO WARRANTY; This is free software, and you are welcome to redistribute it under certain conditions. See LICENSE.txt.

Input sensor was set to: RGB-D 配置文件版本号:

Loading ORB Vocabulary. This could take a while... Vocabulary loaded!

Initialization of Atlas from scratch Creation of new map with id: 0 Creation of new map with last KF id: 0 Seq. Name:

Camera Parameters:

Depth Threshold (Close/Far Points): 2.98842

ORB Extractor Parameters:


Start processing sequence ... Images in the sequence: 680

Inference device: CPU read net ok! Inference device: CPU First KF:0; Map init KF:0 New Map created with 807 points Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Starting the Viewer Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU Inference device: CPU 并没有出现yolo进行识别,没有识别到人啊,很奇怪,求博主解答

Glencsa commented 1 month ago

模型加载主要在./Examples_old/RGB-D/rgbd_tum.cc 里面,这个是运行的主程序,看下你有没有改错地方。 image 这个地方是另一种方式的实现,你也可以用这个。

LUCKEYgirl commented 1 month ago

好的好的感谢作者,我注释掉注释,就可以运行了,但是没有mask,掩模和二值化,我正在研究