Prem95 / realtime-face-anti-spoofing

Realtime Face Anti Spoofing with Face Detector based on Deep Learning using Tensorflow/Keras and OpenCV
MIT License
14 stars 0 forks source link

$ sh build.sh ./build_cpu_nms.sh: line 2: python3: command not found ./build_sim3dr.sh: line 1: python3: command not found build.sh: line 10: gcc: command not found #15

Closed shashidharpatil123 closed 2 years ago

shashidharpatil123 commented 2 years ago

Hi @prem, please provide some help to solve the issue.

$ sh build.sh ./build_cpu_nms.sh: line 2: python3: command not found ./build_sim3dr.sh: line 1: python3: command not found build.sh: line 10: gcc: command not found

tayyab-tariq commented 2 years ago

shashidharpatil123, you can do two things to resolve this.

First: Go to your Python installation folder and copy the Python exe file and rename it as Python3. Then, you need to download C compiler and add the gcc command to your PATH variable.

Second: You can replace the code in nms_wrapper.py with the following:

from .nms.py_cpu_nms import py_cpu_nms

def nms(dets, thresh): """Dispatch to either CPU or GPU NMS implementations."""

if dets.shape[0] == 0:
    return []
return py_cpu_nms(dets, thresh)

I'd recommend following step 2 since you don't need to build your sh file.