Mask_RCNN icon indicating copy to clipboard operation
Mask_RCNN copied to clipboard

Project dependencies may have API risk issues

Open PyDR-Tool opened this issue 3 years ago • 0 comments

Hi, In Mask_RCNN, inappropriate dependency versioning constraints can cause risks.

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

numpy*
scipy*
Pillow*
cython*
matplotlib*
scikit-image*
tensorflow>=1.3.0
keras>=2.0.8
opencv-python*
h5py*
imgaug*
IPython[all]

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 keras can be changed to >=2.2.0,<=2.3.1.

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 keras
mnist.load_data
saving.load_weights_from_hdf5_group_by_name
saving.load_weights_from_hdf5_group
keras.regularizers.l2
The calling methods from the all methods
gt_box.astype
info.np.array.reshape
len
tf.device
tf.reduce_sum
self.random_shape
overlaps_graph
InferenceConfig
config.DetectionTargetLayer
tf.divide
imgaug.augmenters.Fliplr
model.compile
tf.expand_dims
time.time
np.argsort
x.mrcnn_mask_loss_graph.KL.Lambda
tf.nn.top_k
list
self.auto_download
np.around
model_in.append
masks2.shape.masks2.np.reshape.astype
merged.append
utils.resize_mask
K.shape
maskUtils.encode
self.make_parallel
h5py.File
self.build
dataset.load_image
build_fpn_mask_graph
color_splash
gray.image.mask.np.where.astype
layer_outputs.append
tf.add_n
pip.req.parse_requirements
box_centers_x.box_centers_y.np.stack.reshape
tf.where
config.BACKBONE
m.np.around.astype
min
x.parse_image_meta_graph.KL.Lambda
self.compile
chr
set
x_train.np.expand_dims.astype
logging.exception
iaa.Affine
np.random.randint
plt.title
hasattr
self.set_log_dir
dataset.prepare
next
filter
self.DetectionLayer.super.__init__
self.self.__class__.super.image_reference
f.write
model.get_imagenet_weights
masked_image.astype
self.checkpoint_path.replace
skimage.io.imread
n.KL.Concatenate
bg_color.astype
dataset_val.load_balloon
tf.minimum
plt.subplots
ImportError
compute_overlaps
round
K.int_shape
scipy.ndimage.zoom
KL.MaxPooling2D
tf.identity
num_classes.KL.Dense.KL.TimeDistributed
KL.Input
ratios.flatten
random.choice
coco.loadAnns
tf.constant
N.detections.astype
image_id.astype
self.inner_model.summary
np.delete
np.random.choice
self.ParallelModel.super.summary
DetectionTargetLayer
plt.figure
image.astype
tf.cast
saving.load_weights_from_hdf5_group
array.max
modellib.MaskRCNN
config.COMPUTE_BACKBONE_SHAPE
saving.load_weights_from_hdf5_group_by_name
utils.compute_overlaps
self.keras_model.metrics_tensors.append
i.rois.astype
annotations.values
anchors.tf.Variable.KL.Lambda
utils.box_refinement
dataset_val.load_coco
open
self.DetectionTargetLayer.super.__init__
np.abs
plt.ylabel
x.mrcnn_bbox_loss_graph.KL.Lambda
np.asfortranarray
ImageDataGenerator
np.stack
self.config.NAME.lower
rpn
plt.xlabel
np.fliplr
os.path.dirname
FileNotFoundError
tf.reset_default_graph
rle.flatten
i.mask.astype
tf.reduce_mean
np.int32.rle.np.array.reshape
cocoEval.accumulate
coco.loadCats
keras.callbacks.ModelCheckpoint
CocoDataset
name.split
model.train
m.sum
zip_ref.extractall
print
self.random_image
m.max
keras.regularizers.l2
clean_name
build_rpn_model
build_detection_targets
self.map_source_class_id
outputs.keys
np.argmax
os.walk
np.minimum
num_classes.KL.Conv2D.KL.TimeDistributed
images.astype
model.summary
tf.boolean_mask
utils.unmold_mask
tf.sets.set_intersection
COCOeval
plt.text
KL.TimeDistributed
KL.Add
np.split
K.not_equal
mask.T.flatten
re.fullmatch
tf.pad
utils.denorm_boxes
self.keras_model.metrics_names.append
iaa.OneOf
rpn_class_loss_graph
tf.log
iaa.Flipud
i.i.mask.copy
parse_image_meta_graph
tf.concat
colorsys.hsv_to_rgb
datagen.flow
trim_zeros
dataset_val.load_nucleus
self.find_trainable_layer
t.tf.shape.t.tf.reshape.KL.Lambda
model.get_trainable_layers
self.config.LOSS_WEIGHTS.get
np.broadcast_to
checked.append
pred_match.np.cumsum.astype
visualize.display_instances
np.cumsum
iaa.SomeOf
np.zeros
build_model
K.switch
cv2.VideoWriter
box_widths.box_heights.np.stack.reshape
K.mean
getattr
cv2.VideoCapture
np.sqrt
np.expand_dims
vcapture.get
boxes.astype
image_info.update
KL.Conv2DTranspose.KL.TimeDistributed
KL.Lambda
detect_and_color_splash
original_image_shape.astype
tf.Variable
iaa.Multiply
KL.Conv2DTranspose
self.CocoDataset.super.load_mask
np.where
r.astype
COCO
KL.UpSampling2D
setup
KL.Conv2D.KL.TimeDistributed
image_metas.append
apply_mask
tf.reshape
i.overlaps.max
tf.image.non_max_suppression
compute_overlaps_masks
map
tf.split
f.startswith
urllib.request.urlopen
np.logical_not
Exception
datetime.datetime
tf.random_shuffle
ax.set_xlim
generate_random_rois
self.config.WEIGHT_DECAY.keras.regularizers.l2
tf.abs
skimage.color.gray2rgb
smooth_l1_loss
box_to_level.append
scale.shift.boxes.np.divide.astype
iaa.Fliplr
os.path.abspath
ax.set_ylim
plt.axis
num_classes.s.KL.Reshape
self.set_trainable
LooseVersion
build_coco_results
self.inner_model
json.load
clip_boxes_graph
np.pad
np.divide
w.std
trim_zeros_graph
compute_ap
np.multiply
IPython.display.display
matplotlib.use
g.np.where.reshape
display_images
super
np.any
l.get_weights
x.rpn_class_loss_graph.KL.Lambda
OrderedDict
self.__class__.super.image_reference
block.stage.str.KL.Activation
random.shuffle
AP.append
self.ParallelModel.super.__init__
ax.imshow
array.min
mask.astype
use_bias.conv_name_base.kernel_size.kernel_size.nb_filter2.KL.Conv2D
re.match
args.model.lower
compute_backbone_shapes
tf.map_fn
datetime.datetime.now
image_shape.astype
np.logical_and
evaluate_coco
f.endswith
os.makedirs
math.sin
np.all
itertools.product
keras.callbacks.TensorBoard
imgaug.HooksImages
coco.loadRes
s.i.name.input_slices.KL.Lambda
name.KL.Concatenate
clipped.set_shape
tf.squeeze
tf.nn.sparse_softmax_cross_entropy_with_logits
class_keep.set_shape
K.learning_phase
mrcnn_mask_loss_graph
Polygon
table.append
argparse.ArgumentParser
logging.warning
tf.size
KM.Model
np.dot
ax.set_title
bool
outputs_all.append
log2_graph
dataset_train.load_balloon
np.arange
text.ljust
self.get_anchors
np.argwhere
self.keras_model.fit_generator
fpn_classifier_graph
plt.savefig
type
utils.generate_pyramid_anchors
log
BalloonDataset
dataset.get_source_class_id
random_colors
dataset_train.prepare
masks1.shape.masks1.np.reshape.astype
data_generator
DetectionLayer
resnet_graph
dataset.load_mask
model.fit_generator
id.rois.astype
KL.Activation
build_rpn_targets
K.function
ax.text
dataset.load_nucleus
dataset_train.load_nucleus
coco.imgs.keys
np.log
config.config.RPN_NMS_THRESHOLD.proposal_count.ProposalLayer
np.reshape
self.mold_inputs
to_display.append
plt.imshow
BalloonConfig
lines.append
tf.shape
math.radians
self.keras_model.get_layer
x.config.rpn_bbox_loss_graph.KL.Lambda
instance_masks.append
zip
coco.getCatIds
pick.append
tf.range
utils.compute_matches
rle.split
image.copy
skimage.color.rgb2gray
np.sort
kf
self.ancestor
skimage.io.imsave
plt.yticks
mold_image
cv2.VideoWriter_fourcc
boxes.append
model.load_weights
utils.non_max_suppression
pip.download.PipSession
plt.xticks
tf.greater
max
BatchNorm
image_ids.extend
identity_block
self.PyramidROIAlign.super.__init__
CocoConfig
use_bias.conv_name_base.nb_filter1.KL.Conv2D
sys.path.append
dataset_train.load_coco
np.amax
titles.append
vwriter.write
K.binary_crossentropy
model.detect
ax.add_line
source.self.source_class_ids.append
l.outputs_all.append
pool_size.pool_size.fc_layers_size.KL.Conv2D.KL.TimeDistributed
self.class_info.append
scales.flatten
np.copy
plt.subplot
mrcnn_class_loss_graph
tf.sparse_tensor_to_dense
windows.append
self.annToRLE
resize
tf.cond
inputs.extend
compose_image_meta
skimage.draw.polygon
apply_box_deltas_graph
tf.unique
tf.stack
ax.plot
multiprocessing.cpu_count
full_masks.append
compute_iou
coco.getImgIds
dir
overlaps.max
K.cast
np.unique
np.round
mask_to_rle
results.extend
num_classes.KL.Dense
bn_name_base.BatchNorm
config.display
KL.Flatten
str
molded_images.append
config.MEAN_PIXEL.normalized_images.astype
self.self.__class__.super.load_mask
K.abs
maskUtils.decode
x_test.np.expand_dims.astype
callable
conv_block
vcapture.read
tf.gather
sorted
mrcnn_bbox_loss_graph
cv2.rectangle
self.image_info.append
norm_boxes_graph
load_image_gt
rpn_graph
mask.reshape
class_ids.append
train
np.random.shuffle
K.reshape
layer_regex.keys
x.mrcnn_class_loss_graph.KL.Lambda
tf.sqrt
x.KL.Lambda
self.add_class
keras.optimizers.SGD
parser.add_argument
model.find_last
join
os.path.join
maskUtils.frPyObjects
tf.exp
i.refined_boxes.astype
class_ids.astype
random.randint
pip_ver.split
AP.np.array.mean
m.group
np.uint32.image.astype.copy
rle_encode
threshold.mask.np.where.astype
refine_detections_graph
int
outputs.append
mnist.load_data
tf.round
tf.maximum
outputs_np.items
self.add_image
box.astype
utils.norm_boxes
cv2.fillPoly
KL.ZeroPadding2D
display_table
_parse_requirements
tf.multiply
PyramidROIAlign
np.maximum
plt.tight_layout
tuple
np.ones
enumerate
fc_layers_size.KL.Conv2D.KL.TimeDistributed
config.TOP_DOWN_PYRAMID_SIZE.KL.Conv2D
self.self.__class__.super.call
shapes.append
batch_pack_graph
mask.np.logical_not.astype
np.meshgrid
re.compile
KL.Activation.KL.TimeDistributed
self.ProposalLayer.super.__init__
np.exp
pool_size.pool_size.PyramidROIAlign
BatchNorm.KL.TimeDistributed
KL.Concatenate
K.sparse_categorical_crossentropy
utils.box_refinement_graph
submission.append
utils.extract_bboxes
vwriter.release
np.random.rand
use_bias.conv_name_base.nb_filter3.KL.Conv2D
mask.append
range
K.less
tf.reduce_max
anchor_stride.KL.Conv2D
warnings.catch_warnings
lines.Line2D
ax.axis
ParallelModel
coco.getAnnIds
find_contours
NucleusInferenceConfig
detect
compute_matches
self.CocoDataset.super.image_reference
config.DetectionLayer
scores.argsort
det.augment_image
self.keras_model.add_loss
self.draw_shape
tf.image.crop_and_resize
anchors_per_location.KL.Conv2D
results.append
tf.equal
warnings.simplefilter
outputs.values
tf.to_float
window.astype
math.ceil
NucleusDataset
dataset_val.prepare
anchors.append
utils.resize_image
zipfile.ZipFile
tf.logical_and
get_file
skimage.transform.resize
KL.Conv2D
utils.batch_slice
layers.append
maskUtils.merge
np.concatenate
rpn_bbox_loss_graph
self.class_names.index
f.close
np.sum
self.annToMask
utils.compute_iou
tf.argmax
detection_targets_graph
w.max
use_bias.conv_name_base.strides.nb_filter1.KL.Conv2D
display_instances
gray.astype
pkg_resources.get_distribution
os.path.exists
self.ParallelModel.super.__getattribute__
self.keras_model.compile
NucleusConfig
a.values
generate_anchors
tf.transpose
parser.parse_args
args.weights.lower
cocoEval.evaluate
f.mask_dir.os.path.join.skimage.io.imread.astype
np.max
IPython.display.HTML
K.sum
ax.add_patch
iaa.GaussianBlur
np.empty
tf.Assert
self.unmold_detections
plt.show
inputs.append
name.replace
cocoEval.summarize
graph_fn
K.squeeze
scale.astype
isinstance
KL.Reshape
pooled.append
utils.minimize_mask
x.K.squeeze.K.squeeze.KL.Lambda
tf.stop_gradient
cv2.circle
active_class_ids.astype
shutil.copyfileobj
gt_w.gt_h.class_mask.utils.resize.np.round.astype
w.min
K.equal
shift.scale.boxes.np.multiply.np.around.astype
np.array
tf.gather_nd
KL.Dense
tf.tile
a.startswith
utils.resize
np.diff
format
tf.control_dependencies
np.hstack
patches.Rectangle
tf.name_scope
ProposalLayer
outputs.extend
name.outputs.len.o.tf.add_n.KL.Lambda
utils.download_trained_weights
instance_masks.np.stack.astype
augmentation.to_deterministic
input_image.K.shape.x.norm_boxes_graph.KL.Lambda
use_bias.conv_name_base.strides.nb_filter3.KL.Conv2D
self.keras_model.predict

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

PyDR-Tool avatar Jul 15 '22 18:07 PyDR-Tool