bubbliiiing / mobilenet-yolov4-tf2

这是一个mobilenet-yolov4的库,把yolov4主干网络修改成了mobilenet,修改了Panet的卷积组成,使参数量大幅度缩小。
MIT License
47 stars 26 forks source link

Project dependencies may have API risk issues #3

Open PyDeps opened 2 years ago

PyDeps commented 2 years ago

Hi, In mobilenet-yolov4-tf2, inappropriate dependency versioning constraints can cause risks.

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

scipy==1.4.1
numpy==1.18.4
matplotlib==3.2.1
opencv_python==4.2.0.34
tensorflow_gpu==2.2.0
tqdm==4.46.1
Pillow==8.2.0
h5py==2.10.0

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 matplotlib can be changed to >=1.3.0,<=3.0.3. The version constraint of dependency tqdm can be changed to >=4.36.0,<=4.64.0. The version constraint of dependency Pillow can be changed to ==9.2.0. The version constraint of dependency Pillow can be changed to >=2.0.0,<=9.1.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 matplotlib
matplotlib.use
The calling methods from the tqdm
tqdm.tqdm
The calling methods from the Pillow
PIL.Image.fromarray
PIL.ImageFont.truetype
PIL.Image.new
PIL.Image.open
The calling methods from the all methods
random.shuffle
utils.utils.cvtColor
txt_file.split
utils.dataloader.YoloDatasets.on_epoch_end
numpy.median
g
PIL.ImageDraw.Draw.text
super
annotation_line.split
pycocotools.cocoeval.COCOeval.accumulate
warnings.warn
sub_block_id.str.block_id.str.RandomNormal.hidden_channel.Conv2D
train_step
int
tensorflow.keras.layers.Conv2D
numpy.where
tensorflow.GradientTape
numpy.arange
datetime.datetime.strftime
_activation
MobileNetV1
yolo.detect_image.append
tensorflow.keras.models.Model.summary
tensorflow.while_loop
PIL.ImageDraw.Draw.textsize
numpy.array
join
obj.find.find
nets.yolo.get_train_model.fit
tp_sorted.append
numpy.random.uniform
numpy.array.paste
l.self.anchors_mask.index
cv2.waitKey
tensorflow.keras.initializers.RandomNormal.Conv2D
pbar.update
results_file.write
os.path.splitext
PIL.ImageFont.truetype
scipy.signal.savgol_filter
tensorflow.keras.models.Model
fig.add_subplot.add_patch
self.val_loss.append
self.yolo_model
box_ciou
tensorflow.keras.backend.reshape
pycocotools.cocoeval.COCOeval.summarize
sigmoid
self.yolo_model.predict
math.cos
tensorflow.keras.backend.get_value
tensorflow.keras.layers.Input
cv2.resize
map
tensorflow.keras.layers.AveragePooling2D
shutil.rmtree
merge_bbox.append
boxes_per_image.append
utils.cvtColor
tensorflow.keras.backend.max
image.resize.transpose
round
l.get_input_shape_at
tmp_box.append
tensorflow.keras.backend.minimum
os.walk
val_loss.numpy
tensorflow.distribute.MirroredStrategy
kwargs.items
tensorflow.keras.layers.Add
PIL.ImageDraw.Draw
weight_decay.num_filters.DarknetConv2D_BN_Leaky
cv2.VideoCapture.get
i_list.append
format
utils.utils.get_classes
tensorflow.keras.callbacks.LearningRateScheduler
get_train_step_fn
transition_block
tensorflow.ones_like
nets.mobilenet_v2.MobileNetV2
self.generate
gt_match.split
draw_plot_func
tensorflow.keras.backend.round
numpy.insert
bounding_boxes.append
VOCdevkit_path.os.path.join.open.read.strip.split
cv2.copyMakeBorder.copy
cv2.putText
pycocotools.coco.COCO.loadImgs
numpy.expand_dims
tensorflow.keras.backend.cast
functools.wraps
self.monitor_op
matplotlib.pyplot.gcf.get_figheight
prefix.RandomNormal.out_channels.Conv2D
adjust_axes
numpy.argmin
prefix.RandomNormal.reduced_ch.Conv2D
matplotlib.pyplot.gcf.tight_layout
pbar.set_postfix
img_name.replace
cv2.getTextSize
numpy.zeros.append
f
rec.insert
os.path.join
hard_swish.Activation
math.ceil
_smooth_labels
nets.yolo.yolo_body
img_name.lower.endswith
matplotlib.pyplot.grid
r.x.astype
matplotlib.use
pycocotools.cocoeval.COCOeval.evaluate
mAP_YOLO.detect_image
rec.append
numpy.uint8
block_id.strides.RandomNormal.depth_multiplier.DepthwiseConv2D
operator.itemgetter
functools.partial
relu6.Activation
tensorflow.keras.backend.image_data_format
self.model.save
cv2.split
str.astype
tensorflow.keras.optimizers.SGD
hard_sigmoid.Activation
matplotlib.pyplot.gca.invert_yaxis
image_datas.append
os.path.abspath
load_data
tensorflow.keras.layers.MaxPooling2D
numpy.tile
setattr
open.close
cv2.VideoWriter.release
obj.find
format.BatchNormalization
error
name.reduction.x.backend.int_shape.int.layers.Conv2D
tensorflow.keras.backend.epsilon
tensorflow.keras.layers.ZeroPadding2D
utils.utils.cvtColor.crop
obj.split
block_id.BatchNormalization
name.layers.BatchNormalization
tensorflow.keras.layers.Multiply
weight_decay.num_classes.anchors_mask.len.DarknetConv2D
make_five_convs
gamma.alpha.focal_loss.label_smoothing.num_classes.input_shape.input_shape.num_classes.anchors_mask.anchors.input_shape.yolo_loss.Lambda
prefix.exp_size.Reshape
matplotlib.pyplot.gcf
draw_text_in_image
image.size.np.floor.astype
os.makedirs
self.rand
tensorflow.keras.backend.square
tensorflow.keras.backend.sigmoid
i.j.List1.rjust
collections.defaultdict
self.ExponentDecayScheduler.super.__init__
img_name.lower
hard_swish
matplotlib.pyplot.title
image_id.VOCdevkit_path.os.path.join.ET.parse.getroot
matplotlib.pyplot.ylim
prec.append
loss_history.on_epoch_end
categories.append
time.time
image.resize.resize
json.load
inputs.correct_pad.ZeroPadding2D
tensorflow.cast
PIL.Image.fromarray
pycocotools.coco.COCO.getCatIds
tensorflow.maximum
tensorflow.keras.backend.expand_dims.stack
preprocess_dr
cv2.merge
sys.exit
f.readline
utils.callbacks.EvalCallback
self.WarmUpCosineDecayScheduler.super.__init__
strategy.run
eval_callback.on_epoch_end
cv2.VideoCapture.read
block_id.RandomNormal.pointwise_conv_filters.Conv2D
tensorflow.keras.backend.min
self.model.predict
random.seed
fp_sorted.append
glob.glob
bool
nets.yolo.get_train_model
utils.resize_image
tensorflow.keras.backend.dtype
l.get_output_shape_at
detection.split
tensorflow.config.experimental.set_memory_growth
yolo.YOLO.detect_heatmap
utils.utils.preprocess_input
label.encode.encode
self.ModelCheckpoint.super.__init__
prefix.channel_axis.BatchNormalization
self.letterbox_image.self.max_boxes.self.nms_iou.self.confidence.self.anchors_mask.self.input_shape.self.num_classes.self.anchors.DecodeBox.Lambda
tensorflow.config.experimental.list_physical_devices
matplotlib.pyplot.imshow
name.layers.Activation
gt_counter_per_class.keys
tensorflow.keras.layers.Lambda
PIL.Image.open
kwargs.get
utils.callbacks.ModelCheckpoint
matplotlib.pyplot.gcf.savefig
enumerate
no_bias_kwargs.update
matplotlib.pyplot.gca.set_xlim
matplotlib.pyplot.barh
os.path.normpath
kmeans
cv2.cvtColor
prefix.RandomNormal.exp_size.Conv2D
numpy.logical_and
xml.etree.ElementTree.parse.findtext
strides.RandomNormal.kernel.filters.Conv2D
matplotlib.pyplot.gca.get_xlim
right.np.floor.astype
math.exp
colorsys.hsv_to_rgb
utils.utils.net_flops
anchors.np.array.reshape
numpy.mean
tensorflow.keras.backend.constant
matplotlib.pyplot.xlabel
PIL.Image.new
near.last_clu.all
yolo.YOLO.detect_image
numpy.logical_and.split
prefix.RandomNormal.pointwise_filters.Conv2D
tape.gradient
tensorflow.keras.callbacks.TensorBoard
matplotlib.pyplot.yticks
matplotlib.pyplot.close
self.loss_plot
block_id.relu6.Activation
matplotlib.pyplot.Rectangle
tensorflow.distribute.MirroredStrategy.scope
yolo.detect_image.show
numpy.exp
matplotlib.pyplot.margins
fig.canvas.get_renderer
optimizer.apply_gradients
name.layers.AveragePooling2D
avg_iou
pow
os.path.expanduser.endswith
json.dump
format.Multiply
tensorflow.Print
prefix.stride.RandomNormal.kernel_size.DepthwiseConv2D
min
tensorflow.data.Dataset.from_generator
image.resize.convert
sub_block_id.str.block_id.str.BatchNormalization
matplotlib.pyplot.xlim
tensorflow.shape
yolo.YOLO.get_FPS
matplotlib.pyplot.savefig
tensorflow.distribute.MirroredStrategy.experimental_distribute_dataset
tensorflow.keras.backend.shape
tensorflow.keras.optimizers.Adam
convert_annotation
random.sample.append
loss.numpy
self.__dict__.update
part.str.sub_block_id.str.block_id.str.RandomNormal.ratio.dw_size.DepthwiseConv2D
tensorflow.boolean_mask
AssertionError
f.readlines
utils.callbacks.LossHistory
self.get_map_txt
prefix.stride.stride.RandomNormal.DepthwiseConv2D
utils.utils_map.get_map
images.append
nets.yolo.yolo_body.load_weights
tensorflow.keras.backend.concatenate.append
utils_map.get_coco_map
tensorflow.keras.callbacks.EarlyStopping
cas_iou
os.path.basename
cv2.imwrite
numpy.shape
val_step
collections.defaultdict.keys
tensorflow.keras.backend.arange
numpy.reshape
matplotlib.pyplot.plot
annotation_line.split.split
fig.canvas.set_window_title
numpy.random.shuffle
numpy.exp.append
weight_decay.pointwise_conv_filters.DarknetConv2D
numpy.argsort
_bneck
tensorflow.keras.layers.UpSampling2D
box_iou
os.path.exists
net.save_weights
numpy.random.rand
cv2.VideoCapture.release
tensorflow.keras.backend.ones_like
os.path.isfile
batch_size.gen.shuffle.prefetch
tensorflow.image.non_max_suppression
get_val_step_fn
cv2.VideoCapture
utils.utils.resize_image
preprocess_gt
prec.insert
det_counter_per_class.keys
left.np.floor.astype
numpy.random.seed
datetime.datetime.now
strategy.reduce
tensorflow.keras.backend.floatx
glob.glob.sort
os.listdir
matplotlib.pyplot.figure
self.EvalCallback.super.__init__
VOCdevkit_path.os.path.join.open.read.strip
image_id.VOCdevkit_path.os.path.join.ET.parse.getroot.findall
bottom.np.floor.astype
float
tensorflow.keras.layers.Activation
open
tensorflow.keras.backend.binary_crossentropy
tensorflow.keras.initializers.RandomNormal.update
tensorflow.keras.layers.DepthwiseConv2D
nets.mobilenet_v3.MobileNetV3
yolo.detect_image.save
utils.utils_map.get_coco_map
image_set.year.VOCdevkit_path.os.path.join.open.read.strip.split
numpy.floor
matplotlib.pyplot.figure.add_subplot
os.path.expanduser
prefix.RandomNormal.in_channels.expansion.Conv2D
format.GlobalAveragePooling2D
self.epoches.append
tensorflow.keras.layers.Concatenate
self.model.save_weights
self.filepath.format
_ghost_module
_depthwise_conv_block
VOCdevkit_path.os.path.join.open.read
self.get_pred
cv2.imshow
matplotlib.pyplot.gcf.get_figwidth
numpy.array.append
self.get_random_data
mAP_YOLO
_inverted_res_block
pycocotools.cocoeval.COCOeval
sigmoid.append
log_average_miss_rate
yolo.YOLO
bboxes.extend
zip
total_xml.append
file_lines_to_list
DarknetConv2D_BN_Leaky
l.grid_shapes.t.b.true_boxes.np.floor.astype
image_set.year.VOCdevkit_path.os.path.join.open.read
nets.mobilenet_v1.MobileNetV1
cv2.VideoWriter
numpy.clip
net_flops
tensorflow.keras.backend.expand_dims.write
tensorflow.keras.layers.BatchNormalization
tensorflow.keras.backend.maximum
numpy.zeros
print
cv2.rectangle
xml.etree.ElementTree.parse.getroot
tqdm.tqdm
tensorflow.reduce_sum
PIL.ImageDraw.Draw.rectangle
net
tensorflow.sigmoid
nets.densenet.DenseNet
numpy.sum
numpy.maximum
xml.etree.ElementTree.parse.iter
numpy.random.choice
printTable
self.losses.append
isinstance
c.strip
utils.utils.show_config
cv2.VideoWriter_fourcc
cv2.copyMakeBorder
matplotlib.pyplot.subplots_adjust
cocoGt.imgToAnns.keys
nets.yolo.yolo_loss
lr_scheduler_func
annotations.append
input
box_datas.append
matplotlib.pyplot.legend
utils.preprocess_input
image.crop.save
f.write
matplotlib.pyplot.text
cv2.destroyAllWindows
_conv_block
matplotlib.pyplot.gca
matplotlib.pyplot.show
self.get_random_data_with_Mosaic
glob.glob1
tensorflow.keras.layers.Reshape
utils.utils_fit.fit_one_epoch
tensorflow.keras.backend.concatenate
self.get_random_data_with_MixUp
numpy.random.normal
results.append
_make_divisible
exp.slices.Lambda
sub_block_id.str.block_id.str.RandomNormal.output_channel.Conv2D
json.dumps
sub_block_id.str.block_id.str.RandomNormal.ratio.hidden_channel._make_divisible.Conv2D
list
line.split
dict
image_set.year.VOCdevkit_path.os.path.join.open.read.strip
dense_block
class_names.index
nets.yolo_training.get_lr_scheduler
x.strip
name.growth_rate.layers.Conv2D
numpy.logspace
xml.etree.ElementTree.parse
pycocotools.coco.COCO.loadRes
random.sample
tensorflow.keras.backend.sum
line.os.path.basename.split
bounding_boxes.sort
cv2.VideoWriter.write
matplotlib.pyplot.gcf.set_figheight
utils_map.get_map
get_anchors_and_decode
open.write
DarknetConv2D
tensorflow.keras.backend.tile
numpy.argmax
tensorflow.keras.layers.UpSampling2D.weight_decay.alpha.int.DarknetConv2D_BN_Leaky.compose
out.numpy
self.merge_bboxes
ValueError
obj.findtext
nets.yolo.get_train_model.compile
_ghost_bottleneck
tensorflow.keras.backend.exp
tensorflow.TensorArray
self.preprocess_true_boxes
PIL.Image.open.save
range
prefix.x.correct_pad.ZeroPadding2D
matplotlib.pyplot.ylabel
utils.utils_bbox.get_anchors_and_decode
weight_decay.alpha.int.DarknetConv2D_BN_Leaky
numpy.minimum
tensorflow.keras.backend.set_value
tree.getroot.iter
tensorflow.keras.regularizers.l2
tensorflow.math.atan2
i.out_scores.numpy
name.name_box_id.append
tensorflow.keras.initializers.RandomNormal.first_block_filters.Conv2D
correct_pad
sub_block_id.str.block_id.str.RandomNormal.strides.kernel.DepthwiseConv2D
tensorflow.keras.layers.GlobalAveragePooling2D
classes.index
numpy.float64
self.monitor.startswith
tuple
xml.endswith
numpy.log
name.layers.Concatenate
len
numpy.max
cv2.LUT
nets.ghostnet.Ghostnet
tensorflow.keras.backend.gather
matplotlib.pyplot.fill_between
max
optimizer.lr.numpy
strategy.experimental_distribute_dataset.shuffle
dictionary.items
utils.utils.get_anchors
matplotlib.pyplot.text.get_window_extent
voc_ap
tensorflow.keras.initializers.RandomNormal
str
new_f.write
top.np.floor.astype
weight_decay.l2.strides.depth_multiplier.RandomNormal.DepthwiseConv2D
t.b.true_boxes.astype
nets.yolo.yolo_body.summary
tensorflow.keras.backend.expand_dims
numpy.empty
format.Activation
utils.dataloader.YoloDatasets
sorted
part.str.sub_block_id.str.block_id.str.RandomNormal.stride.kernel_size.output_channels.Conv2D
num_classes.true_boxes.all
tensorflow.keras.backend.int_shape
conv_block
r.x.np.clip.astype
anchors.np.array.reshape.split
batch_size.gen_val.shuffle.prefetch
utils.utils.compose
already_seen_classes.append
pycocotools.coco.COCO
numpy.concatenate
tensorflow.keras.backend.relu
prefix.relu6.Activation
format.Add
functools.reduce
box.split
matplotlib.pyplot.gca.set_ylim
part.str.sub_block_id.str.block_id.str.BatchNormalization
matplotlib.pyplot.cla
yolo_correct_boxes
self.model.load_weights
yolo.YOLO.get_map_txt
matplotlib.pyplot.axis
image.resize.paste
self.maps.append
_squeeze
matplotlib.pyplot.scatter
cv2.imread
logs.get

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