diff --git a/README.md b/README.md new file mode 100644 index 0000000..9f2de6f --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# DeepSORT_Face Recognition and tracking +facenet-pytorch(MTCNN) and DeepSORT diff --git a/deep_sort/deep_sort_face.py b/deep_sort/deep_sort_face.py index ebf179f..049a599 100644 --- a/deep_sort/deep_sort_face.py +++ b/deep_sort/deep_sort_face.py @@ -69,7 +69,7 @@ def update(self, bbox_xywh, confidences, ori_img): box = track.to_tlwh() # (xc,yc,a,h) to (x1,y1,w,h) x1, y1, x2, y2 = self._tlwh_to_xyxy(box) track_id = track.track_id - outputs.append(np.array([x1, y1, x2, y2, track_id], dtype=np.int)) + outputs.append(np.array([x1, y1, x2, y2, track_id], dtype=int)) if len(outputs) > 0: outputs = np.stack(outputs, axis=0) # (#obj, 5) (x1,y1,x2,y2,ID) return outputs diff --git a/deep_sort/sort/detection.py b/deep_sort/sort/detection.py index 74f41ad..3994ce9 100644 --- a/deep_sort/sort/detection.py +++ b/deep_sort/sort/detection.py @@ -27,9 +27,9 @@ class Detection(object): """ def __init__(self, tlwh, confidence, feature): - self.tlwh = np.asarray(tlwh, dtype=np.float) # x1, y1, w, h + self.tlwh = np.asarray(tlwh, dtype=np.double) # x1, y1, w, h self.confidence = float(confidence) - self.feature = np.asarray(feature, dtype=np.float32) + self.feature = np.asarray(feature, dtype=np.double) def to_tlbr(self): """Convert bounding box to format `(min x, min y, max x, max y)`, i.e., diff --git a/deep_sort/sort/preprocessing.py b/deep_sort/sort/preprocessing.py index de31eea..6eaf3a6 100644 --- a/deep_sort/sort/preprocessing.py +++ b/deep_sort/sort/preprocessing.py @@ -37,7 +37,7 @@ def non_max_suppression(boxes, max_bbox_overlap, scores=None): if len(boxes) == 0: return [] - boxes = boxes.astype(np.float) + boxes = boxes.astype(np.float64) pick = [] x1 = boxes[:, 0] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..adf2fe0 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,35 @@ +certifi==2023.7.22 +charset-normalizer==3.2.0 +cmake==3.27.2 +easydict==1.10 +facenet-pytorch==2.5.3 +filelock==3.12.2 +idna==3.4 +Jinja2==3.1.2 +lit==16.0.6 +MarkupSafe==2.1.3 +mpmath==1.3.0 +networkx==3.1 +numpy==1.25.2 +nvidia-cublas-cu11==11.10.3.66 +nvidia-cuda-cupti-cu11==11.7.101 +nvidia-cuda-nvrtc-cu11==11.7.99 +nvidia-cuda-runtime-cu11==11.7.99 +nvidia-cudnn-cu11==8.5.0.96 +nvidia-cufft-cu11==10.9.0.58 +nvidia-curand-cu11==10.2.10.91 +nvidia-cusolver-cu11==11.4.0.1 +nvidia-cusparse-cu11==11.7.4.91 +nvidia-nccl-cu11==2.14.3 +nvidia-nvtx-cu11==11.7.91 +opencv-python==4.8.0.76 +Pillow==10.0.0 +PyYAML==6.0.1 +requests==2.31.0 +scipy==1.11.1 +sympy==1.12 +torch==2.0.1 +torchvision==0.15.2 +triton==2.0.0 +typing_extensions==4.7.1 +urllib3==2.0.4 diff --git a/runtime.txt b/runtime.txt new file mode 100644 index 0000000..e3d06d7 --- /dev/null +++ b/runtime.txt @@ -0,0 +1 @@ +python-3.10.12 \ No newline at end of file