deepmialab / ai-ffpe Goto Github PK
View Code? Open in Web Editor NEWDeep Learning-based Frozen Section to FFPE Translation
Home Page: https://www.dropbox.com/sh/x7fvxx1fiohxwb4/AAAObJJTJpIHHi-s2UafrKeea?dl=0
License: Other
Deep Learning-based Frozen Section to FFPE Translation
Home Page: https://www.dropbox.com/sh/x7fvxx1fiohxwb4/AAAObJJTJpIHHi-s2UafrKeea?dl=0
License: Other
Hi there, thanks a lot for the great work and congratulations!
I want to quickly adapt your method in my dataset, and sorry that I didn't have time to go through your article carefully. I guess the best models are stored in the FrozGanModels/wAtt_wLoss folder. Am I correct? In addition, I found that there are three cases there. Would you please give me some suggestions if I want to quickly apply your model? Which case should I use? Thanks a lot!
Hi, I tried to try out the CUT pretrained model, however I have the feeling that the pretrained models are outdated by the version of pytorch or that your code has changed so there is a mismatch in loading the models.
Here is the config and the error I get. Could you maybe help me with this?
user@5789a7f2eba2:~/AI-FFPE$ python3 test.py --dataroot /home/user/patches_png/ --results_dir /home/user/results --direction AtoB --dataset_mode single --name Lung/CUT --epoch 5
----------------- Options ---------------
CUT_mode: CUT
batch_size: 1
checkpoints_dir: ./checkpoints
crop_size: 512
dataroot: /home/user/patches_png/ [default: placeholder]
dataset_mode: single [default: unaligned]
direction: AtoB
display_winsize: 512
easy_label: experiment_name
epoch: 5 [default: latest]
eval: False
flip_equivariance: False
gpu_ids: 0
init_gain: 0.02
init_type: xavier
input_nc: 3
isTrain: False [default: None]
lambda_GAN: 1.0
lambda_NCE: 1.0
load_size: 512
max_dataset_size: inf
model: cut
n_layers_D: 3
name: Lung/CUT [default: experiment_name]
nce_T: 0.07
nce_idt: True
nce_includes_all_negatives_from_minibatch: False
nce_layers: 0,4,8,12,16
ndf: 64
netD: basic
netF: mlp_sample
netF_nc: 256
netG: resnet_9blocks
ngf: 64
no_antialias: False
no_antialias_up: False
no_dropout: True
no_flip: False
normD: instance
normG: instance
num_patches: 256
num_test: 50
num_threads: 4
output_nc: 3
phase: test
pool_size: 0
preprocess: none
random_scale_max: 3.0
results_dir: /home/user/results [default: ./results/]
self_regularization: 0.03
serial_batches: False
stylegan2_G_num_downsampling: 1
suffix:
verbose: False
----------------- End -------------------
dataset [SingleDataset] was created
dataset [SingleDataset] was created
model [CUTModel] was created
creating web directory /home/user/results/test_5
loading the model from ./checkpoints/Lung/CUT/5_net_G.pth
Traceback (most recent call last):
File "/home/user/AI-FFPE/test.py", line 57, in <module>
model.setup(opt) # regular setup: load and print networks; create schedulers
File "/home/user/AI-FFPE/models/base_model.py", line 99, in setup
self.load_networks(load_suffix)
File "/home/user/AI-FFPE/models/base_model.py", line 225, in load_networks
net.load_state_dict(state_dict)
File "/usr/local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for ResnetGenerator:
Missing key(s) in state_dict: "SAB.conv1.weight", "SAB.conv2.weight", "SAB.conv3.weight", "model.4.conv1.weight", "model.4.conv2.weight", "model.4.conv3.weight", "model.5.weight", "model.5.bias", "model.8.filt", "model.9.weight", "model.9.bias", "model.12.filt", "model.21.conv_block.1.weight", "model.21.conv_block.1.bias", "model.21.conv_block.5.weight", "model.21.conv_block.5.bias", "model.22.filt", "model.23.weight", "model.23.bias", "model.26.filt", "model.27.weight", "model.27.bias", "model.31.weight", "model.31.bias".
Unexpected key(s) in state_dict: "model.4.weight", "model.4.bias", "model.7.filt", "model.8.weight", "model.8.bias", "model.11.filt", "model.12.conv_block.1.weight", "model.12.conv_block.1.bias", "model.12.conv_block.5.weight", "model.12.conv_block.5.bias", "model.21.filt", "model.22.weight", "model.22.bias", "model.25.filt", "model.26.weight", "model.26.bias", "model.30.weight", "model.30.bias".
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.