assassint2017 / MICCAI-LITS2017

liver segmentation using deep learning
388 stars 91 forks source link

Project dependencies may have API risk issues #28

Open PyDeps opened 1 year ago

PyDeps commented 1 year ago

Hi, In MICCAI-LITS2017, inappropriate dependency versioning constraints can cause risks.

Below are the dependencies and version constraints that the project is using

numpy==1.14.2
torch==1.0.1.post2
visdom==0.1.8.8
pandas==0.23.3
scipy==1.0.0
tqdm==4.40.2
scikit-image==0.13.1
SimpleITK==1.0.1
pydensecrf==1.0rc3

The version constraint == will introduce the risk of dependency conflicts because the scope of dependencies is too strict. The version constraint No Upper Bound and * will introduce the risk of the missing API Error because the latest version of the dependencies may remove some APIs.

After further analysis, in this project, The version constraint of dependency visdom can be changed to >=0.1.8,<=0.1.8.9. The version constraint of dependency scipy can be changed to >=0.12.0,<=1.7.3. The version constraint of dependency tqdm can be changed to >=4.36.0,<=4.64.0. The version constraint of dependency scikit-image can be changed to >=0.12.0,<=0.19.3.

The above modification suggestions can reduce the dependency conflicts as much as possible, and introduce the latest version as much as possible without calling Error in the projects.

The invocation of the current project includes all the following methods.

The calling methods from the visdom
visdom.Visdom.line
visdom.Visdom
The calling methods from the scipy
scipy.ndimage.morphology.binary_erosion
scipy.ndimage.zoom
scipy.ndimage.morphology.generate_binary_structure
The calling methods from the tqdm
tqdm.tqdm
The calling methods from the scikit-image
skimage.morphology.remove_small_holes
The calling methods from the all methods
SimpleITK.GetArrayFromImage.astype
sum.append
dice.torch.log.torch.pow.mean
pandas.DataFrame.mean
self.pred_mask.self.real_mask.sum
self.real2pred_nn.sum
pydensecrf.utils.create_pairwise_gaussian
target.target.pred.pow.sum.sum
copy.deepcopy
net.ResUNet.ResUNet
self.decoder_stage3
self.map3
SimpleITK.GetImageFromArray.SetSpacing
pydensecrf.densecrf.DenseCRF.stepInference
random.randint
self.up_conv3
ct_array.torch.FloatTensor.unsqueeze.astype
self.map4
target.pred.sum.sum.sum
pred.squeeze.pow
end_slice.start_slice.ct_array.torch.FloatTensor.cuda
self.pred_mask.sum
self.down_conv4
numpy.power
self.ce_loss
file.replace
pred.pow.sum.sum.sum
sys.path.append
ct.cuda.cuda
torch.nn.Upsample
torch.log
self.real2pred_nn.np.power.sum
visdom.Visdom
pydensecrf.densecrf.DenseCRF
SimpleITK.GetImageFromArray.astype
torch.utils.data.DataLoader
pandas.DataFrame.max
net.ResUNet.net.torch.nn.DataParallel.cuda.parameters
torch.save
SimpleITK.WriteImage
pydensecrf.densecrf.DenseCRF.startInference
self.bce_loss
self.down_conv1
isinstance
self.get_jaccard_index
torch.nn.Sequential
math.sqrt
pydensecrf.utils.create_pairwise_bilateral
x.replace.replace
self.voxel_sapcing.np.array.reshape
self.get_surface
utilities.calculate_metrics.Metirc.get_jaccard_index
net.ResUNet.ResUNet.torch.nn.DataParallel.cuda.eval
dict
self.pred2real_nn.sum
scipy.ndimage.morphology.binary_erosion.nonzero
time.time
loss.WBCE.WCELoss
torch.nn.init.kaiming_normal_
super.__init__
torch.nn.init.constant_
torch.long
pandas.DataFrame
numpy.zeros_like
len
scipy.ndimage.morphology.generate_binary_structure
outputs.cpu.detach
SimpleITK.GetImageFromArray
target.pow.sum.sum
print
liver_seg.astype.astype
skimage.measure.regionprops
SimpleITK.GetImageFromArray.SetOrigin
self.pred2real_nn.max
torch.nn.CrossEntropyLoss
loss_func.item
target.sum.sum
torch.pow
torch.no_grad
pred.pow.sum.sum
SimpleITK.ReadImage.GetOrigin
target.pow.sum
self.up_conv2
self.decoder_stage2
scipy.ndimage.zoom.astype
self.pred2real_nn.np.power.sum
net.ResUNet.ResUNet.torch.nn.DataParallel.cuda.load_state_dict
numpy.ones
ResUNet.parameters
os.mkdir
self.decoder_stage4
float
pandas.ExcelWriter
scipy.spatial.cKDTree
loss.Dice.DiceLoss
scipy.ndimage.morphology.binary_erosion
net
net.ResUNet.net.torch.nn.DataParallel.cuda.train
torch.FloatTensor
utilities.calculate_metrics.Metirc
list
self.real2pred_nn.max
torch.nn.PReLU
os.path.exists
self.encoder_stage2
torch.optim.Adam
pred.squeeze.squeeze
spacing_list.sort
self.map2
numpy.zeros_like.astype
Q.np.array.np.argmax.reshape
seg.cuda.cuda
utilities.calculate_metrics.Metirc.get_RMSD
int.para.lower.liver_roi.para.upper.liver_roi.astype.sum
SimpleITK.GetImageFromArray.SetDirection
utilities.calculate_metrics.Metirc.get_FNR
SimpleITK.ReadImage
target.pow.sum.sum.sum
super
s2.s1.mean
torch.optim.lr_scheduler.MultiStepLR
ct_tensor.unsqueeze.unsqueeze
loss.Hybrid.HybridLoss
SimpleITK.ReadImage.GetDirection
loss.ELDice.ELDiceLoss
self.down_conv2
spacing_list.append
loss.backward
format
int
self.encoder_stage4
numpy.prod
ct_tensor.unsqueeze.unsqueeze.unsqueeze
numpy.where
self.up_conv4
torch.optim.Adam.step
sum
self.get_real2pred_nn
torch.optim.Adam.zero_grad
utilities.calculate_metrics.Metirc.get_dice_coefficient
torch.nn.Conv3d
torch.clamp
self.encoder_stage1
dataset.dataset.Dataset
pandas.DataFrame.std
self.real_mask.sum
utilities.calculate_metrics.Metirc.get_FPR
enumerate
scipy.ndimage.zoom
x.replace
net.ResUNet.ResUNet.torch.nn.DataParallel.cuda
ct_array.torch.FloatTensor.unsqueeze
numpy.stack
file.replace.replace
torch.nn.Sigmoid
target.pred.sum.sum
pydensecrf.densecrf.DenseCRF.addPairwiseEnergy
os.path.split
Q.np.array.np.argmax.reshape.astype
pandas.ExcelWriter.save
self.map1
pandas.DataFrame.to_excel
torch.optim.lr_scheduler.MultiStepLR.step
shutil.rmtree
net.ResUNet.net.torch.nn.DataParallel.cuda
range
numpy.any
net.ResUNet.net
net.cpu
torch.nn.DataParallel
target.pred.sum
target.target.pred.pow.sum.sum.sum
param.numel
loss.SS.SSLoss
zip
ResUNet
torch.nn.functional.dropout
torch.ones_like
SimpleITK.GetArrayFromImage
visdom.Visdom.line
collections.OrderedDict
parameter.lower.liver_roi.para.upper.liver_roi.astype
self.down_conv3
SimpleITK.ReadImage.GetSpacing
loss.Tversky.TverskyLoss
torch.cat
pydensecrf.densecrf.DenseCRF.setUnaryEnergy
numpy.argmax
numpy.array
utilities.calculate_metrics.Metirc.get_MSD
os.path.join
loss.Jaccard.JaccardLoss
utilities.calculate_metrics.Metirc.get_VOE
map
self.get_pred2real_nn
utilities.calculate_metrics.Metirc.get_ASSD
os.listdir
time_pre_case.append
outputs.cpu.detach.numpy
skimage.measure.label
torch.load
target.pred.sum.sum.sum.mean
step_list.append
self.encoder_stage3
net.ResUNet.net.torch.nn.DataParallel.cuda.state_dict
int.seg_array.astype.sum
pred.pow.sum
target.pow
pydensecrf.densecrf.DenseCRF.inference
numpy.squeeze
torch.nn.BCELoss
target.sum.sum.sum
ResUNet.apply
file_name.append
pandas.DataFrame.min
collections.OrderedDict.append
numpy.zeros
tqdm.tqdm
max
target.pred.pow
torch.FloatTensor.cuda
loss.BCE.BCELoss
min
torch.nn.ConvTranspose3d
skimage.morphology.remove_small_holes
scipy.spatial.cKDTree.query
loss_func
target.target.pred.pow.sum
self.decoder_stage1
target.sum
pydensecrf.utils.unary_from_softmax

@developer Could please help me check this issue? May I pull a request to fix it? Thank you very much.