This guide offers a step-by-step procedure for installing and configuring the GIPHY Celebrity Detector. We recommend initially consulting the official installation instructions. Should you encounter any difficulties or achieve less than satisfactory results, please consider following the instructions provided herein to try a successful installation.
- Clone the repository:
git clone https://github.com/Giphy/celeb-detection-oss.git
cd celeb-detection-oss
conda create -n GCD python=3.6
conda activate GCD
- Modify the
setup.pyfile:
- Open
celeb-detection-oss/setup.py - Locate line 37 and replace
x.reqwithx.requirement
- Update the requirements:
- Open
celeb-detection-oss/requirements_cpu.txt - Comment out the numpy on line 8
numpy==1.15.1andtorch==0.4.1at the end of the file.
pip install -r requirements_gpu.txt
pip install -e .
cd examples
cp .env.example .env
pip install imageio==2.4.1 pandas
pip install --upgrade scikit-image
- Download the
resources.tar.gzfile from this OneDrive folder and replace theresourcesfolder insideceleb-detection-oss/exampleswith the extracted one.
- Modify the face detection network configuration:
-
Open
celeb-detection-oss/model_training/preprocessors/face_detection/network.py -
On line 88, modify to include
allow_pickle=True, i.e.,data_dict = np.load(data_path, encoding='latin1', allow_pickle=True).item()
- Evaluate the accuracy of GCD on a folder of generated images. When utilizing this script for detection, please ensure that the content within the input folder consists solely of images, without the need to navigate into subdirectories. This precaution helps prevent errors during the process.
conda activate GCD
CUDA_VISIBLE_DEVICES=0 python metrics/evaluate_by_GCD.py --image_folder 'path/to/generated/image/folder'