eigenvivek / diffdrr Goto Github PK
View Code? Open in Web Editor NEWAuto-differentiable digitally reconstructed radiographs in PyTorch
Home Page: https://vivekg.dev/DiffDRR
License: MIT License
Auto-differentiable digitally reconstructed radiographs in PyTorch
Home Page: https://vivekg.dev/DiffDRR
License: MIT License
It looks very nice in notebook, but the framerate is much too high when saved to disk
My comments
Reviewer 1
Reviewer 2
Reviewer 3
Similar to how seaborn or sklearn open toy datasetes
Instead of multiresolution rays, use a multiresolution voxel grid (ie, octree represent the CT)
Nalini's advice:
Probably an indexing error with the volume
Downgrade ~1.4
Currently, the random subsample of pixels is initialized with the DRR generator. Instead, the random sample should be generated every time the forward model is called. This ensures that the entire image can be sampled over the course of an optimization run, instead just a fixed subset.
The last PR (#65) might have broken 3D plotting functions
Switching to einsum notation will break some of the indexing for getting source point and detector plane
generate two DRRs
sum sq diff as loss func
params, perturb by a vector (randomly generated)
then compute the finite difference
two gradients (auto and finite)
compute difference
compute length of difference
scatterplot
x : length of gradient (for finite differences)
y : length of difference
might want to do this for every parameter separately because they have different scales
Use time.perf_counter
to time code, not time.time
A few notebooks were never updated to the new API and it's confusing for first-time users. Need to fix any breaking changes in the notebooks.
Something in animation function is producing too much whitespace around saved GIFs
Need to figure out how to remove this
Want to be able to compute just a subset of the pixels
also would be helpful to have sparse implementations of loss functions too!
Just want to verify that the gradients are correct
DiffDRR/diffdrr/utils/camera.py
Lines 66 to 71 in 2aec414
Seems to be a bug when a ray doesn't intersect the volume, causes some CUDA indexing error that makes the program crash
Use einsum notation to do all the tensor computations in DRR generation
This notation make the computation of batched DRRs much easier as well (#30)
Allow "cuda:x"
as input to get_device
, in addition to "cuda"
.
Extend the API to allow multiple set of parameters be passed simultaneously
Also check that XCorr2 will work with batches in current form
The 3D volume and the 2D detector plane are stored as their physical analogs (3D voxelgrid and 4D tensor of spatial coordinates, respectively). This is helpful for conceptualization, but there is no need to structure the code based on the geometry of the real world.
Once a large tensor like alpha
, alphamids
or step_length
is no longer necessary, it should be deleted to free up memory on the GPU
This would also potentially allow us to overcome memory issues for large DRRs
Given an input DRR from unknown parameters, train a NN to predict the parameters (ie, an pre-initialization network)
Start w/ the architecture in Fig 4 from alansary et al
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.