A synthetic data generator for video caption pairs.
Simian creates synthetic data that is usable for generative video and video captioning tasks. The data consists of videos and captions. The videos are generated using Blender, a 3D modeling software.
NOTE: Simian requires Python 3.11.
- Install dependences:
pip install -r requirements.txt- Download the datasets:
./scripts/get_data.sh- [OPTIONAL] If you're on a headless Linux server, install Xorg and start it:
sudo apt-get install xserver-xorg -y && \
sudo python3 scripts/start_x_server.py startpython3 simian/combiner.py --count 1000 --seed 42Configure the flags as needed:
--widthand--heightare the resolution of the video.--combination_indexis the index of the combination to render.--output_diris the directory to save the rendered video.--hdri_pathis the directory containing the background images.--start_frameand--end_frameare the start and end frames of the video.--animation_lengthis the total number of frames, this as a result controls the how fast the animation will appear.--imagesadding this will output images instead of video at random frames. Creates multiple images per combination of varying sizes
Or generate all or part of the combination set using the batch.py script:
To generate a video(s):
python3 simian/batch.py --start_index 0 --end_index 1000 --width 1024 --height 576 --start_frame 1 --end_frame 65 --animation_length 120To generate an image(s):
python3 simian/batch.py --start_index 0 --end_index 1000 --width 1024 --height 576 --start_frame 1 --end_frame 65 --animation_length 120 --imagesMake captions more prompt friendly.
NOTE: Create a .env file and add your OpenAI API key
python3 scripts/rewrite_captions.pyRendering can be distributed across multiple machines using the "simian.py" and "worker.py" scripts.
You will need to set up Redis and obtain Huggingface API key to use this feature.
You can make a free Redis account here.
For local testing and multiple local workers, you can use the following script to set up a local instance of Redis:
scripts/setup_redis.shYou can get a Huggingface API key here.
Now, start your workers
export REDIS_HOST=<myhost>.com
export REDIS_PORT=1337
export REDIS_USER=default
export REDIS_PASSWORD=<somepassword>
export HF_TOKEN=<token>
export HF_REPO_ID=<repo_id>
celery -A simian.worker worker --loglevel=infoYou can also build and run the worker with Docker
# build the container
docker build -t simian-worker .
# run the container with .env
docker run --env-file .env simian-worker
# run the container with environment variables
docker run -e REDIS_HOST={myhost} -e REDIS_PORT={port} -e REDIS_USER=default -e REDIS_PASSWORD={some password} -e HF_TOKEN={token} -e HF_REPO_ID={repo_id} simian-workerFinally, issue work to your task queue
python3 simian/simian.py --start_index 0 --end_index 10 --width 1024 --height 576If you want to use a custom or hosted Redis instance (recommended), you can add the redis details like this:
export REDIS_HOST=<myhost>.com
export REDIS_PORT=1337
export REDIS_USER=default
export REDIS_PASSWORD=<somepassword>To run tests look into the test folder and run whichever test file you want
python object_test.pyWe are currently using the following datasets: Objaverse
Backgrounds are loaded from: Poly Haven
We welcome contributions! We're especially interested in help adding and refining datasets, improving generation quality, adding new features and dynamics and allowing the project to meet more use cases.
- Check out the issues here.
- Join our Discord here.
- Get in touch with us so we can coordinate on development.
- Or, you know, just YOLO a pull request. We're pretty chill.
This project is licensed under the MIT License - see the LICENSE file for details.
If you use it, please cite us:
@misc{Simian,
author = {Raccoon Research},
title = {Simian: A Synthetic Data Generator for Video Caption Pairs},
year = {2024},
publisher = {GitHub},
howpublished = {\url{https://github.com/RaccoonResearch/simian}}
}This project follows the all-contributors specification. Contributions of any kind welcome!
M̵̞̗̝̼̅̏̎͝Ȯ̴̝̻̊̃̋̀Õ̷̼͋N̸̩̿͜ ̶̜̠̹̼̩͒ 🚇 |
Eric S 💻 |
Raccoon Research is sponsored by the following organizations:
Interested in working with us? Join our Discord or post an issue to get in touch.

