keyword stringclasses 7
values | repo_name stringlengths 8 98 | file_path stringlengths 4 244 | file_extension stringclasses 29
values | file_size int64 0 84.1M | line_count int64 0 1.6M | content stringlengths 1 84.1M ⌀ | language stringclasses 14
values |
|---|---|---|---|---|---|---|---|
3D | feos-org/feos | docs/recipes/recipes_surface_tension_pure.ipynb | .ipynb | 3,012 | 137 | {
"cells": [
{
"cell_type": "markdown",
"id": "2f323a90-1e4f-4a27-a495-38dbf8dad3e3",
"metadata": {},
"source": [
"# Surface tension of a pure substance "
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "06f40029-24e4-4f91-b502-6b9265818ed8",
"metadata": {},
"outputs": [... | Unknown |
3D | feos-org/feos | docs/recipes/recipes_automatic_differentiation.ipynb | .ipynb | 8,076 | 279 | {
"cells": [
{
"cell_type": "markdown",
"id": "9767dd5f",
"metadata": {},
"source": [
"# Phase equilibria including derivatives"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "fb44d253",
"metadata": {},
"outputs": [],
"source": [
"import feos\n",
"import num... | Unknown |
3D | feos-org/feos | docs/recipes/recipes_phase_diagram_pure.ipynb | .ipynb | 100,175 | 128 | {
"cells": [
{
"cell_type": "markdown",
"id": "4c4ed7f1-9e71-4d8c-bc51-9b972bf5a8cc",
"metadata": {},
"source": [
"# Phase diagram of a pure substance"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "b6b2b5bb-4c0c-49c9-bea2-1d34055a57dd",
"metadata": {},
"outputs": [],
... | Unknown |
3D | feos-org/feos | docs/theory/eos/index.md | .md | 349 | 12 | # Equations of state
This section explains the thermodynamic principles and algorithms used for equation of state modeling in $\text{FeO}_\text{s}$.
```{eval-rst}
.. toctree::
:maxdepth: 1
properties
critical_points
```
It is currently still under construction. You can help by [contributing](https://github.... | Markdown |
3D | feos-org/feos | docs/theory/eos/properties.md | .md | 10,218 | 118 | # Properties
(Bulk) equilibrium properties can be calculated as derivatives of a thermodynamic potential. In the case of equations of state, this thermodynamic potential is the Helmholtz energy $A$ as a function of its characteristic variables temperature $T$, volume $V$, and amount of substance of each component $n_i... | Markdown |
3D | feos-org/feos | docs/theory/eos/critical_points.md | .md | 2,006 | 31 | # Stability and critical points
The implementation of critical points in $\text{FeO}_\text{s}$ follows the algorithm by [Michelsen and Mollerup](https://tie-tech.com/new-book-release/). A necessary condition for stability is the positive-definiteness of the quadratic form ([Heidemann and Khalil 1980](https://doi.org/1... | Markdown |
3D | feos-org/feos | docs/theory/models/index.md | .md | 296 | 12 | # Models
This section describes the thermodynamic models implemented in $\text{FeO}_\text{s}$.
It is currently still under construction. You can help by [contributing](https://github.com/feos-org/feos/issues/70).
```{eval-rst}
.. toctree::
:maxdepth: 1
hard_spheres
association
``` | Markdown |
3D | feos-org/feos | docs/theory/models/hard_spheres.md | .md | 4,842 | 57 | # Hard spheres
$\text{FeO}_\text{s}$ provides an implementation of the Boublík-Mansoori-Carnahan-Starling-Leland (BMCSL) equation of state ([Boublík, 1970](https://doi.org/10.1063/1.1673824), [Mansoori et al., 1971](https://doi.org/10.1063/1.1675048)) for hard-sphere mixtures which is often used as reference contribut... | Markdown |
3D | feos-org/feos | docs/theory/models/association.md | .md | 8,431 | 109 | # Association
The Helmholtz contribution due to short range attractive interaction ("association") in SAFT models can be conveniently expressed as
$$\frac{A^\mathrm{assoc}}{k_\mathrm{B}TV}=\sum_\alpha\rho_\alpha\left(\ln X_\alpha-\frac{X_\alpha}{2}+\frac{1}{2}\right)$$
Here, $\alpha$ is the index of all distinguisha... | Markdown |
3D | feos-org/feos | docs/theory/dft/enthalpy_of_adsorption.md | .md | 9,511 | 111 | # Enthalpy of adsorption and the Clausius-Clapeyron relation
## Enthalpy of adsorption
The energy balance in differential form for a simple adsorption process can be written as
$$\mathrm{d}U=h^\mathrm{in}\delta n^\mathrm{in}-h^\mathrm{b}\delta n^\mathrm{out}+\delta Q$$ (eqn:energy_balance)
Here the balance is chosen... | Markdown |
3D | feos-org/feos | docs/theory/dft/functional_derivatives.md | .md | 3,971 | 42 | # Functional derivatives
In the last section the functional derivative
$$\hat F_{\rho_\alpha}^\mathrm{res}(r)=\left(\frac{\delta\hat F^\mathrm{res}}{\delta\rho_\alpha(r)}\right)_{T,\rho_{\alpha'\neq\alpha}}$$
was introduced as part of the Euler-Lagrange equation. The implementation of these functional derivatives ca... | Markdown |
3D | feos-org/feos | docs/theory/dft/solver.md | .md | 11,534 | 113 | # DFT solvers
Different solvers can be used to calculate the density profiles from the Euler-Lagrange equation introduced previously. The solvers differ in their stability, the rate of convergence, and the execution time. Unfortunately, the optimal solver and solver parameters depend on the studied system.
## Picard i... | Markdown |
3D | feos-org/feos | docs/theory/dft/pdgt.md | .md | 3,464 | 54 | # Predictive density gradient theory
Predictive density gradient theory (pDGT) is an efficient approach for the prediction of surface tensions, which is derived from non-local DFT, see [Rehner et al. (2018)](https://journals.aps.org/pre/abstract/10.1103/PhysRevE.98.063312). A gradient expansion is applied to the weig... | Markdown |
3D | feos-org/feos | docs/theory/dft/derivatives.md | .md | 7,333 | 76 | # Derivatives of density profiles
For converged density profiles equilibrium properties can be calculated as partial derivatives of thermodynamic potentials analogous to classical (bulk) thermodynamics. The difference is that the derivatives have to be along a path of valid density profiles (solutions of the [Euler-Lag... | Markdown |
3D | feos-org/feos | docs/theory/dft/ideal_gas.md | .md | 2,890 | 32 | # Ideal gas properties
Classical DFT can be used to rapidly determine the ideal gas limit of fluids in porous media. In an ideal gas, there are no interactions between the fluid molecules and therefore the residual Helmholtz energy $F^\mathrm{res}$ and its derivatives vanish. Note that this is only the case for spheric... | Markdown |
3D | feos-org/feos | docs/theory/dft/index.md | .md | 462 | 17 | # Classical density functional theory
This section explains the implementation of the core expressions from classical density functional theory in $\text{FeO}_\text{s}$.
```{eval-rst}
.. toctree::
:maxdepth: 1
euler_lagrange_equation
functional_derivatives
solver
derivatives
enthalpy_of_adsorption
... | Markdown |
3D | feos-org/feos | docs/theory/dft/euler_lagrange_equation.md | .md | 8,467 | 111 | # Euler-Lagrange equation
The fundamental expression in classical density functional theory is the relation between the grand potential functional $\Omega$ and the intrinsic Helmholtz energy functional $F$.
$$\Omega(T,\mu,[\rho(r)])=F(T,[\rho(r)])-\sum_i\int\rho_i(r)\left(\mu_i-V_i^\mathrm{ext}(r)\right)\mathrm{d}r$$
... | Markdown |
3D | bu-cisl/3D-Fourier-ptychography-on-LED-array-microscope | MultiSlice_SuperRes.m | .m | 8,795 | 286 | % By Lei Tian, lei_tian@berkeley.edu
% last modified 5/27/2014
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all; clc;
addpath(['..\3D_code']);
% % Define Fourier operators
F = @(x) fftshift(fft2(ifftshift(x)));
Ft = @(x) fftshift(ifft2(ifftshift(x)));
% F = @(x) fftshift(fft2(x))... | MATLAB |
3D | bu-cisl/3D-Fourier-ptychography-on-LED-array-microscope | 3D_code/Fwd_Prop_MultiSlice_Intensity.m | .m | 1,375 | 48 | function I_est = Fwd_Prop_MultiSlice_Intensity( i0, o_slice, k2, dz, P, H0)
%FWD_PROP_MULTISLICE computes the field using multislice approach, with
%propagator H
% Inputs:
% H: fwd propagator between slices
% H0: fwd propagator from Nth slice to focal plane of objective
% o_slice0: current estimate of multi-slice... | MATLAB |
3D | bu-cisl/3D-Fourier-ptychography-on-LED-array-microscope | 3D_code/Back_Prop_MultiSlice_v2.m | .m | 1,955 | 54 | function [ o_slice ] = Back_Prop_MultiSlice_v2( O, k2, dz, o_slice0, phi0, psi0, ...
i0, alpha, beta, iters)
%FWD_PROP_MULTISLICE computes the field using multislice approach, with
%propagator H
% Inputs:
% O: total object field (from multi-slice propagation) at the pupil p... | MATLAB |
3D | bu-cisl/3D-Fourier-ptychography-on-LED-array-microscope | 3D_code/SystemSetup4x_Multislice.m | .m | 7,713 | 224 | % function [ varargout ] = SystemSetup( varargin )
%SYSTEMSETUP initilize general system parameters for LED array microscope
% Last modofied on 4/22/2014
% Lei Tian (lei_tian@berkeley.edu)
% addpath(['..\..\Source_coding']);
% % Define Fourier operators
F = @(x) fftshift(fft2(ifftshift(x)));
Ft = @(x) fftshift(ifft2... | MATLAB |
3D | bu-cisl/3D-Fourier-ptychography-on-LED-array-microscope | 3D_code/SystemSetup4x.m | .m | 6,735 | 190 | % function [ varargout ] = SystemSetup( varargin )
%SYSTEMSETUP initilize general system parameters for LED array microscope
% Last modofied on 4/22/2014
% Lei Tian (lei_tian@berkeley.edu)
% addpath(['..\..\Source_coding']);
% % Define Fourier operators
F = @(x) fftshift(fft2(ifftshift(x)));
Ft = @(x) fftshift(ifft2... | MATLAB |
3D | bu-cisl/3D-Fourier-ptychography-on-LED-array-microscope | 3D_code/MultiSlice_SuperRes_10x_v9.m | .m | 24,179 | 566 | % By Lei Tian, lei_tian@berkeley.edu
% last modified 5/27/2014
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all; clc; close all;
%addpath(['C:\Users\Lei\Dropbox\Berkeley\LEDArray\MatlabCodes\Coded_Illumination\Source_coding']);
% % Define Fourier operators
F = @(x) fftshift(fft2(... | MATLAB |
3D | bu-cisl/3D-Fourier-ptychography-on-LED-array-microscope | 3D_code/AlterMin_MultiSlice_v2.m | .m | 15,993 | 450 | function [o_slice, P, err] = AlterMin_MultiSlice_v2( I, No, Ns, k2, dz, H0, opts)
%AlterMinGlobal_Adaptive Implement alternative minimization sequentially on a stack of
%measurement I (n1 x n2 x nz). It consists of 2 loop. The main loop update
%the reconstruction results r. the inner loop applies projectors/minimizers
... | MATLAB |
3D | bu-cisl/3D-Fourier-ptychography-on-LED-array-microscope | 3D_code/Fwd_Prop_MultiSlice_v2.m | .m | 1,258 | 40 | function [ phi, psi ] = Fwd_Prop_MultiSlice_v2( i0, o_slice, k2, dz)
%FWD_PROP_MULTISLICE computes the field using multislice approach, with
%propagator H
% Inputs:
% H: fwd propagator between slices
% H0: fwd propagator from Nth slice to focal plane of objective
% o_slice0: current estimate of multi-slice object... | MATLAB |
3D | bu-cisl/3D-Fourier-ptychography-on-LED-array-microscope | 3D_code/Proj_OslicePhi.m | .m | 908 | 31 | function [ O,phi ] = Proj_OslicePhi(O0,phi0,psi,psi0,alpha,beta,iters)
%GDUPDATE_MULTIPLICATION update estimate of O and P according to gradient
%descent method, where psi = O*P
% Inputs:
% O0: object estimate, n1xn2
% P0: pupil function estimate: m1xm2
% psi: update estimate field estimate
% psi0: previous f... | MATLAB |
3D | bu-cisl/3D-Fourier-ptychography-on-LED-array-microscope | 3D_code/Proj_ObjPupil.m | .m | 1,485 | 49 | function [ O,P ] = Proj_ObjPupil(O0,P0,G,G0,Ps,alpha,beta,iters)
%GDUPDATE_MULTIPLICATION update estimate of O and P according to gradient
%descent method, where psi = O*P
% Inputs:
% O0: object estimate, n1xn2
% P0: pupil function estimate: m1xm2
% psi: update estimate field estimate
% psi0: previous field e... | MATLAB |
3D | bu-cisl/3D-Fourier-ptychography-on-LED-array-microscope | 3D_code/SystemSetupV2Array10x_Multislice_v4.m | .m | 7,729 | 221 | % function [ varargout ] = SystemSetup( varargin )
%SYSTEMSETUP initilize general system parameters for LED array microscope
% Last modofied on 4/22/2014
% Lei Tian (lei_tian@berkeley.edu)
% addpath(['..\..\Source_coding']);
% % Define Fourier operators
F = @(x) fftshift(fft2(ifftshift(x)));
Ft = @(x) fftshift(ifft2... | MATLAB |
3D | fsahli/EikonalNet | models_tf.py | .py | 17,528 | 470 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 1 16:15:14 2018
@author: Paris
"""
import tensorflow as tf
import numpy as np
import time
from pyDOE import lhs
tf.random.set_random_seed(1234)
np.random.seed(1234)
class Eikonal2DnetCV2:
# Initialize the class
def __init__(se... | Python |
3D | fsahli/EikonalNet | active_learning_2Dexample.py | .py | 5,065 | 169 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 12 14:17:28 2019
@author: fsc
"""
import numpy as np
import matplotlib.pyplot as plt
from pyDOE import lhs
from models_para_tf import Eikonal2DnetCV2RPF
import entropy_estimators as ee
np.random.seed(1234)
def plot_ensemble(T_star, CV_star, X_t... | Python |
3D | fsahli/EikonalNet | 2Dexample.ipynb | .ipynb | 668,457 | 14,421 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# EikonalNet: 2D example\n",
"\n",
"We first import the packages. Note when we import `models_tf`, we will import `tensorflow`. This code is written in tensorflow 1.0"
]
},
{
"cell_type": "code",
"execution_count":... | Unknown |
3D | fsahli/EikonalNet | models_para_tf.py | .py | 22,923 | 562 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 11 12:30:53 2019
@author: fsc
"""
import tensorflow as tf
import timeit
import numpy as np
import time
from pyDOE import lhs
tf.random.set_random_seed(1234)
np.random.seed(1234)
class Eikonal2DnetCV2RPF:
# Initialize the class
d... | Python |
3D | zhangjun001/ICNet | Code/Train.py | .py | 4,602 | 108 | import os
import glob
import sys
from argparse import ArgumentParser
import numpy as np
import torch
from torch.autograd import Variable
from Models import ModelFlow_stride,SpatialTransform,antifoldloss,mse_loss,smoothloss
from Functions import Dataset,generate_grid
import torch.utils.data as Data
parser = ArgumentPars... | Python |
3D | zhangjun001/ICNet | Code/Functions.py | .py | 2,001 | 69 | import SimpleITK as sitk
import numpy as np
import torch.utils.data as Data
def generate_grid(imgshape):
x = np.arange(imgshape[0])
y = np.arange(imgshape[1])
z = np.arange(imgshape[2])
grid = np.rollaxis(np.array(np.meshgrid(z, y, x)), 0, 4)
grid = np.swapaxes(grid,0,2)
grid = np.swapaxes(grid... | Python |
3D | zhangjun001/ICNet | Code/Models.py | .py | 6,569 | 160 | import torch
import torch.nn as nn
import torch.nn.functional as F
class ModelFlow_stride(nn.Module):
def __init__(self, in_channel, n_classes,start_channel):
self.in_channel = in_channel
self.n_classes = n_classes
self.start_channel = start_channel
super(ModelFlow_stride... | Python |
3D | zhangjun001/ICNet | Code/Test.py | .py | 3,525 | 84 | import os
from argparse import ArgumentParser
import numpy as np
import torch
from torch.autograd import Variable
from Models import ModelFlow_stride,SpatialTransform
from Functions import generate_grid,load_5D,save_img,save_flow
import timeit
parser = ArgumentParser()
parser.add_argument("--modelpath", type=str,
... | Python |
3D | yuhui-zh15/TransSeg | src/model.py | .py | 15,811 | 405 | import json
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import pytorch_lightning as pl
import datetime
import pickle
from utils import (
eval_metrics,
eval_metrics_per_img,
get_img_num_slices,
to_list,
get_linear_schedule_with_warmup,
)
from monai.losses im... | Python |
3D | yuhui-zh15/TransSeg | src/compute_flops.py | .py | 3,016 | 92 | import logging
import sys
import json
from argparse import ArgumentParser
import pytorch_lightning as pl
from data import NIIDataLoader
from model import SegmentationModel
import utils
import torch
from torchprofile import profile_macs
def parse_args(args=None):
parser = ArgumentParser()
## Required paramete... | Python |
3D | yuhui-zh15/TransSeg | src/data.py | .py | 7,598 | 241 | import os
import json
import pytorch_lightning as pl
import torch
from functools import partial
import random
import copy
import numpy as np
from monai.transforms import (
AsDiscrete,
AddChanneld,
Compose,
CropForegroundd,
LoadImaged,
Orientationd,
RandFlipd,
RandCropByPosNegLabeld,
... | Python |
3D | yuhui-zh15/TransSeg | src/utils.py | .py | 15,253 | 433 | import json
from collections import OrderedDict
import mmcv
import numpy as np
from torch.optim.lr_scheduler import LambdaLR
# FIXME: This should have been a member var of the model class
# But putting it in utils for now to avoid interface mismatch with old checkpoints
# Format: val/test -> list(int) of number of s... | Python |
3D | yuhui-zh15/TransSeg | src/main.py | .py | 6,240 | 167 | import logging
import sys
import json
from argparse import ArgumentParser
import pytorch_lightning as pl
from data import NIIDataLoader
from model import SegmentationModel
def parse_args(args=None):
parser = ArgumentParser()
## Required parameters for data module
parser.add_argument("--data_dir", default... | Python |
3D | yuhui-zh15/TransSeg | src/backbones/decoders/unetr.py | .py | 4,003 | 128 | import torch
import torch.nn as nn
import torch.nn.functional as F
from monai.networks.layers.utils import get_act_layer, get_norm_layer
from monai.networks.blocks.dynunet_block import UnetOutBlock
from monai.networks.blocks.unetr_block import (
UnetrBasicBlock,
UnetrPrUpBlock,
UnetrUpBlock,
)
class Unetr... | Python |
3D | yuhui-zh15/TransSeg | src/backbones/decoders/setrpup.py | .py | 1,948 | 58 | import torch
import torch.nn as nn
import torch.nn.functional as F
from monai.networks.layers.utils import get_act_layer, get_norm_layer
class SetrPupHead(nn.Module):
def __init__(
self,
channels=768,
num_classes=14,
norm_name="instance",
):
super(SetrPupHead, self).__i... | Python |
3D | yuhui-zh15/TransSeg | src/backbones/decoders/upernet.py | .py | 7,261 | 231 | import torch
import torch.nn as nn
from mmcv.cnn import ConvModule
from mmseg.ops import resize
from abc import ABCMeta, abstractmethod
import torch.nn.functional as F
class PPM(nn.ModuleList):
"""Pooling Pyramid Module used in PSPNet.
Args:
pool_scales (tuple[int]): Pooling scales used in Pooling Py... | Python |
3D | yuhui-zh15/TransSeg | src/backbones/decoders/convtrans.py | .py | 1,446 | 41 | import torch
import torch.nn as nn
import torch.nn.functional as F
from monai.networks.layers.utils import get_act_layer, get_norm_layer
class ConvTransHead(nn.Module):
def __init__(
self,
channels=768,
num_classes=14,
norm_name="instance",
):
super(ConvTransHead, self)... | Python |
3D | yuhui-zh15/TransSeg | src/backbones/encoders/beit3d.py | .py | 33,380 | 889 | # --------------------------------------------------------
# BEIT: BERT Pre-Training of Image Transformers (https://arxiv.org/abs/2106.08254)
# Github source: https://github.com/microsoft/unilm/tree/master/beit
# Copyright (c) 2021 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# By Hangbo Bao
# B... | Python |
3D | yuhui-zh15/TransSeg | src/backbones/encoders/dino3d.py | .py | 16,185 | 500 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# 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 ... | Python |
3D | yuhui-zh15/TransSeg | src/backbones/encoders/swin_transformer.py | .py | 33,378 | 971 | # --------------------------------------------------------
# Swin Transformer
# Copyright (c) 2021 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ze Liu, Yutong Lin, Yixuan Wei
# --------------------------------------------------------
import torch
import torch.nn as nn
import torch.... | Python |
3D | yuhui-zh15/TransSeg | src/backbones/encoders/swin_transformer_3d.py | .py | 32,424 | 940 | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.checkpoint as checkpoint
import numpy as np
from timm.models.layers import DropPath, trunc_normal_
from mmcv.runner import load_state_dict
from mmseg.utils import get_root_logger
from functools import reduce, lru_cache
from operator... | Python |
3D | yuhui-zh15/TransSeg | src/backbones/encoders/pretrained_models/download_weights.sh | .sh | 487 | 6 | wget https://unilm.blob.core.windows.net/beit/beit_base_patch16_224_pt22k_ft22k.pth
wget https://unilm.blob.core.windows.net/beit/beit_base_patch16_224_pt22k.pth
wget https://github.com/SwinTransformer/storage/releases/download/v1.0.0/swin_base_patch4_window7_224_22k.pth
wget https://github.com/SwinTransformer/storage/... | Shell |
3D | yuhui-zh15/TransSeg | src/unetr/unetr.py | .py | 7,751 | 255 | import os
import shutil
import tempfile
import matplotlib.pyplot as plt
import numpy as np
from tqdm import tqdm
from monai.losses import DiceCELoss
from monai.inferers import sliding_window_inference
from monai.transforms import (
AsDiscrete,
EnsureChannelFirstd,
Compose,
CropForegroundd,
LoadIma... | Python |
3D | yuhui-zh15/TransSeg | src/unetr/unetr_eval.py | .py | 7,867 | 256 | from multiprocessing import reduction
import os
import shutil
import tempfile
import matplotlib.pyplot as plt
import numpy as np
from tqdm import tqdm
from monai.losses import DiceCELoss
from monai.inferers import sliding_window_inference
from monai.transforms import (
AsDiscrete,
EnsureChannelFirstd,
Com... | Python |
3D | yuhui-zh15/TransSeg | src/scripts/train_bcv_2d.sh | .sh | 518 | 23 | #!/bin/bash
#SBATCH --job-name=bcv
#SBATCH --cpus-per-task=32
#SBATCH --mem-per-cpu=3gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:8
#SBATCH --time=24:00:00
#SBATCH --output=bcv_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/bcv/processed/ \
--split_json dataset_5slices.json \
--img_size... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/eval_bcv.sh | .sh | 1,373 | 56 | python main.py \
--data_dir data/bcv/processed/ \
--split_json dataset_5slices.json \
--img_size 512 512 5 \
--clip_range -175 250 \
--in_channels 1 \
--out_channels 14 \
--max_steps 25000 \
--train_batch_size 2 \
--eval_batch_size 2 \
--accumulate_grad_batches 1 \
--evaluation 1 \
--model_path ... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_07.sh | .sh | 524 | 23 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=32
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=100:00:00
#SBATCH --output=msd_07_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task07_Pancreas/ \
--split_json dataset_5slic... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_02.sh | .sh | 519 | 23 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=24:00:00
#SBATCH --output=msd_02_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task02_Heart/ \
--split_json dataset_5slices.j... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_acdc_2d.sh | .sh | 521 | 24 | #!/bin/bash
#SBATCH --job-name=acdc
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=24:00:00
#SBATCH --output=acdc_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/acdc/processed/ \
--split_json dataset_5slices.json \
--img_s... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_05.sh | .sh | 519 | 22 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=24:00:00
#SBATCH --output=msd_05_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task05_Prostate/ \
--split_json dataset_5slice... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_01.sh | .sh | 535 | 23 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=100:00:00
#SBATCH --output=msd_01_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task01_BrainTumour/ \
--split_json dataset_5s... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_09_2d.sh | .sh | 537 | 24 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=24:00:00
#SBATCH --output=msd_09_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task09_Spleen/ \
--split_json dataset_5slices.... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_07_2d.sh | .sh | 541 | 24 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=32
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=100:00:00
#SBATCH --output=msd_07_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task07_Pancreas/ \
--split_json dataset_5slic... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_10_2d.sh | .sh | 536 | 24 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=24:00:00
#SBATCH --output=msd_10_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task10_Colon/ \
--split_json dataset_5slices.j... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_03.sh | .sh | 518 | 22 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=32
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=24:00:00
#SBATCH --output=msd_03_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task03_Liver/ \
--split_json dataset_5slices.j... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_10.sh | .sh | 519 | 23 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=24:00:00
#SBATCH --output=msd_10_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task10_Colon/ \
--split_json dataset_5slices.j... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_03_2d.sh | .sh | 535 | 23 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=32
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=24:00:00
#SBATCH --output=msd_03_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task03_Liver/ \
--split_json dataset_5slices.j... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_06.sh | .sh | 515 | 23 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=24:00:00
#SBATCH --output=msd_06_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task06_Lung \
--split_json dataset_5slices.json ... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_09.sh | .sh | 520 | 23 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=24:00:00
#SBATCH --output=msd_09_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task09_Spleen/ \
--split_json dataset_5slices.... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_04_2d.sh | .sh | 543 | 24 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=24:00:00
#SBATCH --output=msd_04_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task04_Hippocampus/ \
--split_json dataset_5sl... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_06_2d.sh | .sh | 532 | 24 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=24:00:00
#SBATCH --output=msd_06_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task06_Lung \
--split_json dataset_5slices.json ... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_05_2d.sh | .sh | 536 | 23 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=24:00:00
#SBATCH --output=msd_05_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task05_Prostate/ \
--split_json dataset_5slice... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_08_2d.sh | .sh | 546 | 24 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=32
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=100:00:00
#SBATCH --output=msd_08_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task08_HepaticVessel/ \
--split_json dataset_... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_01_2d.sh | .sh | 552 | 24 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=100:00:00
#SBATCH --output=msd_01_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task01_BrainTumour/ \
--split_json dataset_5s... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_02_2d.sh | .sh | 536 | 24 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=24:00:00
#SBATCH --output=msd_02_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task02_Heart/ \
--split_json dataset_5slices.j... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_08.sh | .sh | 529 | 23 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=32
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=100:00:00
#SBATCH --output=msd_08_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task08_HepaticVessel/ \
--split_json dataset_... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_bcv.sh | .sh | 502 | 23 | #!/bin/bash
#SBATCH --job-name=bcv
#SBATCH --cpus-per-task=32
#SBATCH --mem-per-cpu=3gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:8
#SBATCH --time=24:00:00
#SBATCH --output=bcv_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/bcv/processed/ \
--split_json dataset_5slices.json \
--img_size... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_acdc.sh | .sh | 504 | 23 | #!/bin/bash
#SBATCH --job-name=acdc
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=24:00:00
#SBATCH --output=acdc_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/acdc/processed/ \
--split_json dataset_5slices.json \
--img_s... | Shell |
3D | yuhui-zh15/TransSeg | src/scripts/train_msd_04.sh | .sh | 525 | 22 | #!/bin/bash
#SBATCH --job-name=msd
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4gb
#SBATCH --partition=pasteur
#SBATCH --gres=gpu:4
#SBATCH --time=24:00:00
#SBATCH --output=msd_04_%A_%a.out
#SBATCH --mail-type=ALL
python main.py \
--data_dir data/msd/processed/Task04_Hippocampus/ \
--split_json dataset_5sl... | Shell |
3D | yuhui-zh15/TransSeg | src/data/bcv/split_data_to_slices_nii.py | .py | 3,849 | 140 | import os
import sys
from shutil import copyfile
from PIL import Image
import cv2
import nibabel as nib
import numpy as np
import json
N = 30
val_slc = [1, 2, 3, 4, 8, 22, 25, 29, 32, 35, 36, 38]
basedir = "RawData/Training/"
outputdir = f"processed"
file_idxs = list(range(1, 11)) + list(range(21, 41))
def ensure_... | Python |
3D | yuhui-zh15/TransSeg | src/data/msd/split_data_to_slices_nii.py | .py | 5,024 | 169 | import os
import sys
import nibabel as nib
import numpy as np
import json
import random
from multiprocessing import Pool
from functools import partial
from tqdm import tqdm
random.seed(1234)
def ensure_dir(file_path):
directory = os.path.dirname(file_path)
os.makedirs(directory, exist_ok=True)
return fil... | Python |
3D | yuhui-zh15/TransSeg | src/data/acdc/split_data_to_slices_nii.py | .py | 5,080 | 171 | import os
import sys
from shutil import copyfile
from PIL import Image
import cv2
import nibabel as nib
import numpy as np
import json
train_filenames = json.load(open("ACDC_dataset.json"))["training"]
train_filenames = [
name["image"].split("/")[-1].replace("imagesTr", "training")
for name in train_filenames
... | Python |
3D | mpes-kit/fuller | fuller/metrics.py | .py | 3,219 | 116 | #! /usr/bin/env python
import inspect
import itertools as it
import numpy as np
from numpy import nan_to_num as n2n
# from sklearn.metrics import pairwise_distances as smp
def dcos(a, b):
"""Cosine distance between vectors a and b."""
aa, bb = list(map(np.linalg.norm, [a, b]))
cos = np.dot(a, b) / (aa ... | Python |
3D | mpes-kit/fuller | fuller/__init__.py | .py | 399 | 25 | #! /usr/bin/env python
import warnings as wn
from . import metrics
from . import utils
with wn.catch_warnings():
wn.simplefilter("ignore")
wn.warn("deprecated", DeprecationWarning)
wn.warn("future", FutureWarning)
try:
from . import generator
except:
pass
try:
from . import mrfRec
except:
... | Python |
3D | mpes-kit/fuller | fuller/utils.py | .py | 14,321 | 515 | #! /usr/bin/env python
import glob as g
import natsort as nts
import numpy as np
import scipy.io as sio
from h5py import File
from scipy.interpolate import RegularGridInterpolator as RGI
from silx.io import dictdump
from tqdm import tqdm as tqdm_classic
from tqdm import tqdm_notebook
# import tensorflow as tf
# from t... | Python |
3D | mpes-kit/fuller | fuller/reconstruction_mrf2d.py | .py | 3,647 | 120 | #! /usr/bin/env python
import matplotlib.pyplot as plt
import numpy as np
# Reconstruction object
class ReconstructionMRF2d:
def __init__(self, k, E, I=None, E0=None, sigma=0.1):
"""
Initialize object
:param k: Momentum as numpy vector
:param E: Energy as numpy vector
:para... | Python |
3D | mpes-kit/fuller | fuller/generator.py | .py | 41,448 | 1,236 | #! /usr/bin/env python
import warnings as wn
import matplotlib.pyplot as plt
import numpy as np
import poppy.zernike as ppz
import scipy.io as sio
import scipy.ndimage as ndi
from scipy import interpolate
from symmetrize import pointops as po
from symmetrize import sym
from . import utils as u
try:
from mpes imp... | Python |
3D | mpes-kit/fuller | fuller/mrfRec.py | .py | 36,808 | 972 | #! /usr/bin/env python
import contextlib
import warnings as wn
import h5py
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from scipy import interpolate
from scipy import io
from scipy import ndimage
from tqdm import tqdm
from .generator import rotosymmetrize
class MrfRec:
"""Class fo... | Python |
3D | mpes-kit/fuller | figures/Fig2_Theory_vs_Reconstruction.ipynb | .ipynb | 11,153 | 247 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Comparison between initialization (LDA-DFT) with reconstruction"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import warnings as wn\n",
"wn.filterwarn... | Unknown |
3D | mpes-kit/fuller | figures/Fig2_SFig5_Four_DFTs_Reconstruction.ipynb | .ipynb | 12,884 | 312 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Reconstruction with four DFT calculations as initializations"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import warnings as wn\n",
"wn.filterwarning... | Unknown |
3D | mpes-kit/fuller | figures/Fig1_Data_preprocessing.ipynb | .ipynb | 7,620 | 273 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Stages of data preprocessing"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import warnings as wn\n",
"wn.filterwarnings(\"ignore\")\n",
"\n",
... | Unknown |
3D | mpes-kit/fuller | figures/Fig3_Approximations_to_reconstruction.ipynb | .ipynb | 5,405 | 163 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Illustration of approximations to a reconstructed band"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import warnings as wn\n",
"wn.filterwarnings(\"ig... | Unknown |
3D | mpes-kit/fuller | figures/SFig6_Tests_on_synthetic_2D_data.ipynb | .ipynb | 10,024 | 331 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Tests of the Markov random field model for reconstructing 2D synthetic data"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import warnings as wn\n",
"w... | Unknown |
3D | mpes-kit/fuller | figures/SFig9_Synthetic_data_and_initial_conditions.ipynb | .ipynb | 11,426 | 357 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Generate synthetic multiband photoemission data using DFT calculations"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import warnings as wn\n",
"wn.fil... | Unknown |
3D | mpes-kit/fuller | figures/Fig3_HexagonalZernike.ipynb | .ipynb | 9,534 | 250 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Digitization of reconstructed bands using hexagonal Zernike polynomials"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import warnings as wn\n",
"wn.fi... | Unknown |
3D | mpes-kit/fuller | figures/SFig4_Hyperparameter_tuning.ipynb | .ipynb | 12,515 | 321 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example visualizations of hyperparameter tuning for reconstruction"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import warnings as wn\n",
"wn.filterw... | Unknown |
3D | mpes-kit/fuller | figures/Fig3_SFig13_Similarity_matrix_and_basis_decomposition.ipynb | .ipynb | 16,213 | 418 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Construct similarity matrix between theoretical and reconstructed band structures"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import warnings as wn\n",
... | Unknown |
3D | mpes-kit/fuller | figures/Fig5_K_and_Mprime.ipynb | .ipynb | 10,254 | 245 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Compare reconstructed and refined band patches around high-symmetry points"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import warnings as wn\n",
"wn... | Unknown |
3D | mpes-kit/fuller | figures/SFig6_Tests_on_synthetic_3D_data.ipynb | .ipynb | 16,138 | 438 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Tests of the Markov random field model for reconstructing 3D synthetic data"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import warnin... | Unknown |
3D | mpes-kit/fuller | figures/SFig9_Reconstruction_with_scaled_theory.ipynb | .ipynb | 9,468 | 247 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Reconstruction for synthetic data with scaled theoretical band structure (LDA-DFT) as initialization"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import ... | Unknown |
3D | mpes-kit/fuller | figures/SFig14_Approximation_along_high-symmetry_lines.ipynb | .ipynb | 10,595 | 331 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Approximation of reconstructed bands viewed from high-symmetry lines"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import warnings as wn\n",
"wn.filte... | Unknown |
3D | mpes-kit/fuller | figures/SFig9_Reconstruction_with_different_theories.ipynb | .ipynb | 18,997 | 429 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Reconstruction for synthetic data with different DFT band structures (PBE, PBEsol, HSE06) as initialization "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
... | Unknown |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.