C言語のDLLにyo​lov4の物体検出モ​デルをロードする方法

function [bboxes, scores, labels, annotatedImage] = yolov4Detect(imageData)
% コード生成対応モデルの読み込み
persistent yolov4Detector;
if isempty(yolov4Detector)
yolov4Detector = coder.loadDeepLearningNetwork("yolov4Detector.mat");
end
% 固定サイズの設定
height = 224; % YOLOv4が使用する高さ
width = 224; % YOLOv4が使用する幅
numChannels = 3; % RGB画像の場合のチャンネル数
% 画像データを再構築
I = reshape(imageData, [height, width, numChannels]);
% 物体検出
[bboxes, scores, labels] = detect(yolov4Detector, I);
% 画像に検出結果を描画
if ~isempty(bboxes)
% バウンディングボックスとラベルを描画
annotatedImage = insertObjectAnnotation(I, 'rectangle', bboxes, labels);
else
% 検出結果がない場合はそのまま返す
annotatedImage = I;
end
end
//
5行目
yolov4Detector = coder.loadDeepLearningNetwork("yolov4Detector.mat");
に対してエラーが発生しました。
The full file path to MAT file or function name 'yolov4Detector.mat' contains unsupported non ASCII characters. For code generation, the full file path must contain ASCII characters only.
どうすれば良いですか

Antworten (1)

Image Analyst
Image Analyst am 16 Okt. 2024

0 Stimmen

Seems like it's saying it doesn't like some of the characters in your path. Your current folder probably has an unsupported character in it. Try using a path with all Western/Latin/English letters in it.

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2024a

Gefragt:

am 16 Okt. 2024

Beantwortet:

am 16 Okt. 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by