Get up and running with Face Looker in 5 minutes!
Create an interactive face that follows your cursor in a React app.
- Python 3.7+ installed
- Node.js installed (for React)
- Replicate account (free tier works!)
- A 512×512 photo of a face
- Go to https://replicate.com/
- Sign up (free)
- Go to https://replicate.com/account/api-tokens
- Copy your API token
- Save it:
export REPLICATE_API_TOKEN=your_token_here# Clone the repo
git clone https://github.com/yourusername/face_looker.git
cd face_looker
# Quick setup (auto-installs dependencies)
./generate.sh my_face.jpgOr manual setup:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtAutomatic (recommended):
./generate.sh my_face.jpgManual:
python main.py --image my_face.jpg --out ./out⏰ This takes 2-5 minutes depending on your settings. Grab a coffee!
# Copy faces to your React project
cp -r ./out /path/to/your-react-app/public/faces
# Copy React files
cp useGazeTracking.js /path/to/your-react-app/src/hooks/
cp FaceTracker.jsx /path/to/your-react-app/src/components/
cp FaceTracker.css /path/to/your-react-app/src/components/import FaceTracker from './components/FaceTracker';
function App() {
return (
<div style={{ width: '400px', height: '400px' }}>
<FaceTracker />
</div>
);
}Your face should now follow the cursor! 🎉
python main.py --image my_face.jpg --out ./out --step 2.5python main.py --image my_face.jpg --out ./out --step 5.face-tracker {
border-radius: 50%;
overflow: hidden;
}export REPLICATE_API_TOKEN=your_actual_token- Check that faces are in
public/faces/ - Verify
basePath="/faces/"matches your structure - Check browser console for 404 errors
- Click on the face area first (might need focus)
- Check that configuration matches in
useGazeTracking.js - Verify all images generated successfully
- Read the full README.md for advanced usage
- Check examples/ for more implementations
- Customize styling in
FaceTracker.css - Try different grid densities
- Default settings: ~$0.01 (121 images)
- Smoother (step 2.5): ~$0.02 (169 images)
- Free tier usually covers initial testing!
- Check the README.md
- Open an issue on GitHub
- See CONTRIBUTING.md
Estimated total time: 5-10 minutes Cost: ~$0.01-0.02 Difficulty: Easy ⭐
Ready? Let's go! 🚀