1adrianb / face-alignment

:fire: 2D and 3D Face alignment library build using pytorch
https://www.adrianbulat.com
BSD 3-Clause "New" or "Revised" License
6.88k stars 1.33k forks source link

Project dependencies may have API risk issues #319

Closed PyDeps closed 1 year ago

PyDeps commented 1 year ago

Hi, In face-alignment, inappropriate dependency versioning constraints can cause risks.

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

opencv-python*
scipy>=0.17.0
scikit-image*
numba*

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 scipy can be changed to >=0.8.0,<=1.2.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 scipy
io.imread
The calling methods from the all methods
int
overlap_similarity
find_packages
box_a.unsqueeze.expand
self.fc7
face_detector_module.FaceDetector
box_b.unsqueeze.expand
other_boxes.box.unsqueeze.jaccard.squeeze
self.conv6_1
ax.axis
_get_preds_fromhm
self.BlazeFaceDetector.super.__init__
inp.to
get_predictions
x.to
tensor_or_path.cpu
nn.MaxPool2d
transform
self.conv1_2
inp.transpose
nn.ReLU
scores.argsort
self.conv7_2_mbox_conf
slice
net.load_anchors
self._define_layers
r1.reshape
self.depth_prediciton_net.eval
d.left
c2.reshape
i.image_batch.cpu.numpy
np.dot
__import__
self.regressor_16
self.face_detector.eval
pred_types.values
heatmaps.inp.torch.cat.self.depth_prediciton_net.data.cpu
_gaussian
img.unsqueeze
self.backbone2
torch.from_numpy
logging.getLogger
load_file_from_url
str
find_version
pred_type
self.classifier_8
self.conv5_3_norm_mbox_loc
self.tensor_or_path_to_ndarray
files.extend
self.BlazeBlock.super.__init__
plt.show
hm.reshape
self.conv2_2
globals
np.zeros
self.classifier_16
self.conv7_2_mbox_loc
dlib.get_frontal_face_detector
d.top
inp.flip.self.face_alignment_net.detach
max
device.torch.tensor.view
read
smframes.append
torch.stack
self.conv4_3
self.conv3_3_norm_mbox_loc
self.face_detector.detect_from_directory
self.SFDDetector.super.__init__
heatmaps.inp.torch.cat.self.depth_prediciton_net.data.cpu.view
ax.imshow
math.floor
dlib.cnn_face_detection_model_v1
c2.permute
F.max_pool2d
self._filter_bboxes
x.torch.from_numpy.permute
s3fd
self.conv3_3_norm
i.mask.i.detection_scores.unsqueeze
tqdm
self._weighted_non_max_suppression
d.bottom
self.conv4_3_norm_mbox_conf
self.conv7_2
d.right
c1.permute
torch.ones
torch.cat
d.rect.right
torch.load
self.face_alignment_net
pytorch_version.rsplit
box.unsqueeze
self.FolderDetector.super.__init__
torch.is_tensor
isinstance
decode
os.path.exists
self.conv6_2_mbox_loc
scores.sum
box_a.box_a.box_a.box_a.unsqueeze
warnings.warn
self.convs
nms
np.concatenate
np.sign
jit
cv2.cvtColor
self.conv4_3_norm_mbox_loc
ax.get_xlim
bboxlists.append
readme_file.read
cv2.flip
self.face_detector.to
F.relu
color.gray2rgb
np.minimum
urlparse
self.weight.view
self.fc7_mbox_conf
inp.self.face_alignment_net.detach
torch.empty
F.softmax
self.eval
scores.coordinates.sum
self._preprocess
fp.read
x.pow.sum
os.path.splitext
new_bboxlists.append
np.linalg.pinv
inp.div_
os.path.isfile
zip
np.floor
output_detections.append
oelem.data.cpu.numpy
super.__init__
draw_gaussian
d.rect.top
self.conv4_1
math.exp
self.conv4_2
net
x.float
landmarks_scores.append
path.dirname
self._device
self.load_state_dict
io.open
img_batch.size
super
logger.error
np.empty
self._decode_boxes
torch.max
self.face_alignment_net.eval
parts.ndimension
np.ones
tensor.shuffle_lr.flip
center.numpy
version_match.group
torch.no_grad
get_preds_fromhm
batch_detect
self.depth_prediciton_net.to
self.conv4_3_norm
img.copy
inp.div_.unsqueeze_
np.maximum
np.expand_dims
self.face_detector.detect_from_batch
img_batch.flip
self.conv3_3
i.image_batch.cpu
BlazeFace.to
keep.append
np.take_along_axis
self._tensors_to_detections
self.detect_from_image
L2Norm
self.conv6_2
idx.np.expand_dims.hm_reshape.np.take_along_axis.squeeze
raw_score_tensor.clamp
img.transpose
self.conv5_2
filtered_detections.append
path.abspath
self.conv6_2_mbox_conf
intersect
torch.tensor
detection.clone
enumerate
self.act
ax.set_xlim
cv2.resize
target_landmarks.reshape.max
np.max
self.conv3_2
self.conv3_3_norm_mbox_conf
torch.inverse
ax.plot
self.face_alignment_net.to
format
shuffle_lr
out.cpu.numpy
img_batch.to
print
torch.eye
self.face_detector.detect_from_image
ax.scatter
bboxlist.append
len
self.conv5_3_norm
target_landmarks.reshape
raw_box_tensor.ndimension
box_a.box_a.box_a.box_a.unsqueeze.expand_as
glob.glob
self.max_pool
image_resize
self.regressor_8
np.ascontiguousarray
self.backbone1
target_landmarks.reshape.min
box_b.unsqueeze
resize_and_crop_image
landmarks.append
self.L2Norm.super.__init__
resize_and_crop_batch
os.path.basename
img_batch.cpu
raw_score_tensor.sigmoid.squeeze
BlazeFace
img_batch.transpose
crop
r2.reshape
inp.transpose.torch.from_numpy.float
os.path.dirname
self.n_channels.torch.empty.fill_
np.zeros_like
ax.view_init
idx.repeat
landmarks_scores_list.append
self.conv3_1
image.copy
scores.squeeze
raw_score_tensor.sigmoid
heatmaps.to
BlazeBlock
self.s3fd.super.__init__
np.load
flip
nn.Parameter
range
path.join
np.min
get_image
image_or_path.detach.cpu
box_b.box_b.box_b.box_b.unsqueeze
tensor.ndimension
d.rect.bottom
np.log
np.exp
box_b.box_b.box_b.box_b.unsqueeze.expand_as
r.group
np.argmax
plt.figaspect
nn.Sequential
box_a.unsqueeze
self.conv5_3
RuntimeError
self.predict_on_batch
r1.permute
io.imread
transform_np
tensor.flip
ImportError
face_alignment.FaceAlignment
image_or_path.detach
self.conv2_1
self.face_detector
kwargs.get
r2.permute
torch.chunk
img.torch.from_numpy.permute
self.face_detector.load_state_dict
self.BlazeFace.super.__init__
collections.namedtuple
pts.view
self.anchors.ndimension
c1.reshape
new_point.int
torch.jit.load
torch.matmul
net.predict_on_image
LooseVersion
locals
np.sum
logger.info
logger.warning
net.load_weights
self.conv7_1
np.eye
i.image_batch.cpu.numpy.transpose
idx.repeat.reshape
box_b.size
models_urls.get
net.predict_on_batch
scores.boxes.torch.cat.to
x.pow
pts_img.numpy
get_dir
windex.hindex.j.oreg.copy.reshape
self.depth_prediciton_net
nn.Conv2d
sys.stderr.write
self.__call__
out.cpu
img.copy.torch.from_numpy.to
tensor_or_path.cpu.numpy
d.rect.left
float
dict
np.array
open
download_url_to_file
x.pow.sum.sqrt
np.where
np.stack
windex.hindex.j.oreg.copy
raw_score_tensor.ndimension
fa.get_landmarks
load_url
plt.figure
detect
detected_faces.items
F.pad
min
self.conv5_1
torch.min
ax.plot3D
setup
torch.clamp
self.conv1_1
new_point.astype
HASH_REGEX.search
torch.zeros
img_batch.cpu.numpy
os.path.join
pts_img.view
jaccard
self.fc7_mbox_loc
self.fc6
torch.zeros_like
self.get_landmarks_from_image
heatmaps.torch.from_numpy.unsqueeze_
self.conv5_3_norm_mbox_conf
re.search
oelem.data.cpu
os.makedirs
image_or_path.detach.cpu.numpy
torch.argsort
C.B.idx.repeat.reshape.astype
fig.add_subplot
box_a.size
math.pow
self.face_detector.load_anchors_from_npy

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