(1)运行faster_rcnn-master\faster_rcnn_build.m
(2)运行faster_rcnn-master\startup.m
下面是一些读demo时候的笔记;
script_faster_rcnn_demo.m日志记录:
p = mfilename('fullpath')的意思是返回mfilename函数所在的脚本的路径(包括脚本文件名)
example:Untitled.m文件放在D:\faster_rcnn下
运行Untitled.m的时候p的值为D:\faster_rcnn\Untitled
[pathstr,name,ext]=fileparts(’D:\faster_rcnn\a.jpg‘);则pathstr为D:\faster_rcnn路径D:\faster_rcnn
name为a ext为.jpg
ps:
p=fileparts(’D:\faster_rcnn\a.jpg‘);则p为D:\faster_rcnn,再fileparts(p)
的结果为 D:\
fullfile()构建完整的文件名 example:f =
fullfile('myfolder','mysubfolder','myfile.m')
f =
myfolder\mysubfolder\myfile.m
和f = ['myfolder\','mysubfolder\','myfile.m'] ;一样
p = genpath(folderName)返回的结果是folderName文件夹名及其所有的子文件夹名字( returns a
path string that includes folderName and multiple levels of
subfolders below folderName.)
example:
D:\faster_rcnn;D:\faster_rcnn\.git;D:\faster_rcnn\.git\hooks;D:\faster_rcnn\.git\info;D:\faster_rcnn\.git\logs;D:\faster_rcnn\.git\logs\refs;D:\faster_rcnn\.git\logs\refs\heads;
addpath();增加文件夹到搜索路径;通常和genpath一块用,增加文件夹及其子文件夹到搜索路径;
run(scriptname)在代码里面运行另外一个matlab脚本文件
A = exist('name','kind') 检查是否存在文件夹 变量名 类等
pwd currentFolder = pwd (returns the current folder as a string to
currentFolder.)
showboxes(im, boxes) Draw bounding boxes on top of an image.