fkong7 / heartffdnet Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
As I've just spent some time doing this, I thought i'd add some instructions to help others.
A tf gpu ready implementation of nearest neighbours needs to be compiled before loss.py
will work out of the box. I've found this can be painful as it is dependent on cuda / tensorflow versions, however these were my steps to create the tf_nndistance_so.so file.
environment: Tensorflow 1.14, Cuda 10.0
1.Download all the tf_nndistance* files from this repo and store all files in same dir
2. cd into your dir and execute sh tf_nndistance_compile.sh
3. If you're lucky this will work as is, however its likely you will have to edit tf_nndistance_compile.sh
. I had to edit the usr/local/cuda dir to ensure that it was pointing at the correct cuda dir. There was also an error telling me that the ltensorflow_framework could not be found. For this error I first found the dir containing my tensorflow libraries using python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())'
, then cd into that dir and check that I have a libtensorflow_framework.so
file. I didnt, but I did have a libtensorflow_framework.so.1
file, so I created a symbolic link as suggested here with the command ln -s libtensorflow_framework.so.1 libtensorflow_framework.so
. After this I was able to compile with no problems.
4. You can test using the nn_distance.py
.
5. Finally change the dir link in loss.py
to your tf_nndistance_so.so file.
When creating a prediction using the MMWHS dataset, can you tell me where the dat_of_template_with_no_veins.dat
file comes from? Assume it would be created from template_no_views_normalized.vtp
using make_control_grid.py
, however i'm getting vtkXMLPolyDataReader errors when executing the following command:
python template/make_control_grid.py --template examples/mmwhs_test/template_with_no_veins_normalized.vtp --template_im examples/place_holder_image.nii.gz --num_pts 6
Any ideas where I'm going wrong?
P.s the weblink to the MMWHS does not work. I think this is the updated one: https://zmiclab.github.io/zxh/0/mmwhs/
full error:
` ERROR: In ../Common/ExecutionModel/vtkExecutive.cxx, line 784
vtkCompositeDataPipeline (0x555a68df0770): Algorithm vtkXMLPolyDataReader(0x555a68ef3250) returned failure for request: vtkInformation (0x555a68f86840)
Debug: Off
Modified Time: 131
Reference Count: 1
Registered Events: (none)
Request: REQUEST_INFORMATION
FORWARD_DIRECTION: 0
ALGORITHM_AFTER_FORWARD: 1
Traceback (most recent call last):
File "template/make_control_grid.py", line 853, in
template = process_template(args.template, args.target_node_num, template_im_fn=args.template_im, ref_template_fn=args.ref_template)
File "template/make_control_grid.py", line 251, in process_template
template = transform_polydata(template, img_center2-img_center, transform, SIZE)
File "template/make_control_grid.py", line 47, in transform_polydata
coords = map_polydata_coords(poly, displacement, transform, size)
File "template/make_control_grid.py", line 39, in map_polydata_coords
coords = vtk_to_numpy(poly.GetPoints().GetData())
AttributeError: 'NoneType' object has no attribute 'GetData' `
Hi, when i'm running your predict.py
out the box, i have an error where the dataloader returns 0 testing volumes and
0 mask volumes. When I dug a little deeper I found that the dataloader was trying to retrieve *.nii.gz, *.vti or *.nii files from inside examples/ct_test
directory. However, in the google drive link you provided there are not any of those files types in the ct_test directory.
Is the program supposed to look for files in this directory? Perhaps you can tell me what you think is going wrong
P.s great work on the paper!
Hello,
I would like to use your pre-trained model, but unfortunately I bumped into errors because of the Tensorflow version. So one of your requirements was to use Tensorflow 1.14, which seems to be no longer an option in environments like Google Colab (where I currently work).
Have you updated your code to be compatible with Tensorflow 2?
Or do you have any suggestions to make it compatible with newer Tensorflow versions?
Cheers,
Nika
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.