訓練過程
訓練過程可以參考http://blog.csdn.net/Jesse_Mx/article/details/65634482,這篇博客從kitti數據集的轉化到訓練文件的修改,訓練過程,乃至訓練的結果都寫的十分詳細,很有參考價值。
測試過程
model_def ='models/VGGNet/KITTI/SSD_300x300/deploy.prototxt'
model_weights = 'models/VGGNet/KITTI/SSD_300x300/KITTI_SSD_300x300_iter_120000.caffemodel'
之後修改94行爲自己的測試圖片路徑image = caffe.io.load_image('examples/images/000800.jpg')
運行該python文件就可以對圖片進行測試了。label_map_file = "data/KITTI/labelmap_kitti.prototxt" #此處修改
接下來是159行修改爲自己的model_name,因爲我的job_name也是SSD_330x330所以沒有修改model_name = "KITTI_{}".format(job_name) #此處修改
接下來是162行到166行,修改如下:# Directory which stores the model .prototxt file.
save_dir = "models/VGGNet/KITTI/{}_video".format(job_name)
# Directory which stores the snapshot of trained models.
snapshot_dir = "models/VGGNet/KITTI/{}".format(job_name)
# Directory which stores the job script and log file.
job_dir = "jobs/VGGNet/KITTI/{}_video".format(job_name)
這裏我簡單解釋一下,job_dir和save_dir是後面要創建的文件夾,所以後面的_video並不需要刪去,我只是修改了一下中間的路徑,把原來的VOC0712改成了KITTI。而snapshot_dir是後面要讀取的權值文件的路徑,這裏修改爲自己的路徑即可。python examples/ssd/ssd_pascal_video.py
否者的話會出現找不到snapshot_dir的錯誤。