ValValu / generate-nft-images

Python script for generate random parts NFT images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generate NFT images

install

It is recommended to use miniconda to manage the environment. After installing miniconda, run the following command to generate the environment and run it

  1. conda create --name generate python=3.9 pillow pandas requests
  2. conda activate generate
  3. pip install python-dotenv
  4. modify configs in src/config.py
  5. run python src/get_table.py, this will generate a table called ratio.csv, you can modify probability of feature occurrence in the ratio column.
  6. run python src/generate.py to generate images.
  7. python src/final_check.py, remove the duplicates and view the current probability distribution, which can be adjusted again.
  8. (can skip) python src/upload_mystery_box.py push mystery box metadata to IPFS
  9. python src/upload.py push data to IPFS

features

  • Generate a template: reads the parts folders, reads the files inside, checks the format and size, and generates a csv

  • Generate image: Fill in the probability of reading the csv and generate the image

  • Rename images: Support to delete some of the generated images and rename others

  • Upload image: upload image and metadata to ipfs and generate hash of tokenURL

  • Multiple folder support: Rare features can be placed in separate folders for generate

  • Upload mystery box data: generate mystery box metadata and upload

  • Generate images by attr.csv, it's use for update old images

discuss

You can use the Discussions to talk

sponsor

0x49E53Fb3d5bf1532fEBAD88a1979E33A94844d1d

ETH

About

Python script for generate random parts NFT images

License:MIT License


Languages

Language:Python 99.7%Language:Shell 0.3%