Skip to content

TalentBoy2333/VideoSAR-segmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

这是一个VideoSAR视频车辆语义分割系统

需要环境: opencv-python, pytorch==1.4.0, numpy in python 3.6 以及matplotlib

数据

VideoSAR视频可以再sandia官网下载: https://www.sandia.gov/radar/video/index.html
Eubank Gate and Traffic VideoSAR
This is VideoSAR footage of a gate at Kirtland Air Force Base. The video shows vehicle traffic moving through the gate in all motions and directions. The shadows moving along the road are always at the actual physical location of vehicles. As a vehicle stops the reflected energy of the vehicle falls on top of the shadow. Once the vehicle continues in motion the shadow is again visible. The lines moving across the screen are Doppler shifts caused by the moving vehicles.

GroundTruth是我自己使用labelme人工标注的.

视频处理

./dataset/路径下video2image.py文件,可以将视频逐帧分解。

标注需要使用labelme手动标注。

模型设置

网络参数在模型文件backbone.pycnnlstm.pymodel.py中设置。程序不复杂,方便二次开发。

训练

运行train.py文件,可以进行训练。

python train.py

网络参数存在./param/路径下,没有的话可以自己创建一个。

torch.save(model.state_dict(), './param/model_epoch'+str(epoch+1).zfill(2)+'.pkl') 

评价

运行eval.py文件可以进行模型评价,将评价结果存在./picture/路径下

python eval.py

eval.py的最后可以运行不同的评价。

1.计算模型iou评分

with torch.no_grad(): 
    eval(param_path='./param/model_epoch20.pkl', threshold=0.5)

2.预测一个连续视频帧的语义分割结果,并进行评价。

with torch.no_grad(): 
    mask_one(142, threshold=0.5, param_path='./param/model_epoch20.pkl', frames_path='./dataset/frames/', segs_path='./dataset/segmentation/')

About

VideoSAR Segmentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages