Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ICON, GradICON, and ConstrICON. Work in Progress #361

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
13 changes: 13 additions & 0 deletions ICON/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2017, Hastings Greer

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
34 changes: 34 additions & 0 deletions ICON/icon_registration/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from icon_registration.losses import (
GradICON,
ICON,
BendingEnergy,
Diffusion,
VelocityFieldBendingEnergy,
VelocityFieldDiffusion,
)

from icon_registration.similarity import (
LNCC,
LNCCOnlyInterpolated,
BlurredSSD,
SSDOnlyInterpolated,
SSD,
NCC,
)
from icon_registration.network_wrappers import (
InverseConsistentAffine,
InverseConsistentVelocityField,
Downsample,
TwoStep,
Affine,
VelocityField,
DisplacementField,
)
from icon_registration.train import train_batchfunction, train_datasets


import numpy as np
import torch
import torch.nn.functional as F
from torch import nn
from icon_registration.registration_module import RegistrationModule
6 changes: 6 additions & 0 deletions ICON/icon_registration/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import torch

if torch.cuda.is_available():
device = torch.device("cuda")
else:
device = torch.device("cpu")
Loading