- Generative image generation from Traits files and part images.
- Metadata generation from Traits files.
- Python3
- pip
# git clone ...
# cd nft-generative
# python -m venv env
# .\env\Scripts\activate
# pip install -r requirements.txt
# git clone ...
# cd nft-generative
# python -m venv env
# ./env/bin/activate
# pip install -r requirements.txt
- Execution is intended to take place in the source directory
# cd ./source
- Requires a Traits file that defines the Config, part images and part combinations.
- Trait files are intended to be generated in Pict and other formats and need to be tab-delimited
Example
# python3 generate_image.py --config=Config/config.yaml --save ./Output/Image
- Convert each line of a tab-delimited Trait to Json and output in CSV.This is identical to the trait file used in image generation.
- Traits that are present in the image but not reflected in the metadata can be skipped with
--ignore
.
Example
python3 traits2json.py --path ./Input/Traits/traits.csv --save ./Output/Traits/traits_json.csv --ignore=backhair
- Output each line of the metadata CSV file as a separate Json file
- CSV files as inputs need to be created separately, e.g. in Excel.
Example
python3 csv2metadata.py --path ./Input/Metadata/metadata.csv --save ./Output/Metadata