This is the interface for the trying generative content replacement (GCR), for CHI 2024 and SOUPS 2024 poster. For details of GCR implementation, please refers to our CHI 2024 paper "Examining Human Perception of Generative Content Replacement in Image Privacy Protection".
A GPU with >24Gb VRAM, 32Gb DRAM, 100Gb Storage, Nodejs, Anaconda
git clone https://github.com/AnranXu/Generative-Content-Replacement.gitcd Generative-Content-Replacement
npm install
conda create -n GCR python=3.10
conda activate GCR
pip install -r requirements.txt
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
cd backend
mkdir pretrained_models
cd pretrained_models
wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pthPlease do not deploy the code to any public servers. We do not ensure the security of the code. Turn on one bash for the backend
cd backend
python backend.pyTurn on another bash for the frontend
npm run startThen, go to your broswer with the below address (do not forget to specify the ip of your PC or server that deploy GCR):
http://localhost:3000/?GCR_Server_IP=your_server_ip