FeiGeChuanShu / ncnn-android-yolov8

Real time yolov8 Android demo by ncnn
416 stars 83 forks source link

替换自己的模型后报空指针异常 #9

Open gaoscxy opened 1 year ago

gaoscxy commented 1 year ago

以下是报错信息 image

模型修改为yolov8s.param和yolov8s.bin并替换,yolo.cpp做如下修改: 第143行: const int num_points = grid_strides.size(); const int num_class = 1; const int reg_max_1 = 16; 第357行: int Yolo::draw(cv::Mat& rgb, const std::vector<Object>& objects) { static const char* class_names[] = { "eye" // "person", "bicycle", "car", "motorcycle", "airplane", "bus", "train", "truck", "boat", "traffic light", // "fire hydrant", "stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse", "sheep", "cow", // "elephant", "bear", "zebra", "giraffe", "backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee", // "skis", "snowboard", "sports ball", "kite", "baseball bat", "baseball glove", "skateboard", "surfboard", // "tennis racket", "bottle", "wine glass", "cup", "fork", "knife", "spoon", "bowl", "banana", "apple", // "sandwich", "orange", "broccoli", "carrot", "hot dog", "pizza", "donut", "cake", "chair", "couch", // "potted plant", "bed", "dining table", "toilet", "tv", "laptop", "mouse", "remote", "keyboard", "cell phone", // "microwave", "oven", "toaster", "sink", "refrigerator", "book", "clock", "vase", "scissors", "teddy bear", // "hair drier", "toothbrush" }; 我还需要做什么吗?请大佬解答

sp-suipeng commented 1 year ago

请问你解决了吗