我想用深度学习做医学图像分割作为我的毕业论文,使用的数据是2015年的brats Challenge。
例如: MHA 文件
但是我不知道怎么用python打开.mha文件。我用的是tensorflow框架,所以用python更方便,除此之外,我还需要对数据图做一些预处理。
from medpy.io import load
url = r'G:\path\to\mine.mha'
mage_data,image_header = load(url)
Run Code Online (Sandbox Code Playgroud)
然后:
medpy.core.exceptions.DependencyError: Loading images of type Itk/Vtk MetaImage (.mhd, .mha/.raw) requires a third-party module that could not be encountered. Reason: No module named 'filter'.
Run Code Online (Sandbox Code Playgroud)
Brats 挑战赛是一项国际比赛。但我不知道我应该使用什么网络结构来训练我的网络。如果你有好的建议,请告诉我。
这是我的代码:
def contact(request):
if request.method == 'POST':
form = forms.ContactForm(request.POST)
if form.is_valid():
message = 'Thanks for your post.'
user_name = form.cleaned_data['user_name']
user_city = form.cleaned_data['user_city']
user_school = form.cleaned_data['user_school']
user_email = form.cleaned_data['user_email']
user_message = form.cleaned_data['user_message']
ctx = {
'user_name':user_name,
'user_city':user_city,
'user_school':user_school,
'user_email':user_email,
'user_message':user_message,
}
else:
message = 'Please check the format of your information.'
else:
form = forms.ContactForm()
template = get_template('contact.html')
request_context = RequestContext(request)
request_context.push(locals())
html = template.render(request_context)
return HttpResponse(html)
Run Code Online (Sandbox Code Playgroud)
但我得到以下异常:
TypeError: context must be a dict rather than RequestContext.
Run Code Online (Sandbox Code Playgroud)
如何修改我的代码以避免此错误?(我的英文很差,抱歉)