Giter Site home page Giter Site logo

generate-nft's Introduction

Generate NFT

克隆这个项目

https://github.com/Jianghuchengphilip/Generate-NFT.git

安装库

pip install Pillow pandas progressbar2 PyYaml -i https://pypi.tuna.tsinghua.edu.cn/simple

添加素材

打开assets文件夹,按目录添加素材并修改config.yaml

运行

python nft.py

打赏地址 0x92B097fAbADdcE7AFBeFe0962B538B23f7D08622

附v2.3软件版使用指南:

config.yaml必知:
1、将素材文件都放到asset中,且最好保证都为png格式。
2、检查asset文件夹里面是否存在隐藏文件,若有请删除。[方法:文件管理器->查看->隐藏文件]
3、asset中不能有空文件夹
4、config.yaml右键选记事本方式打开。
5、config.yaml中CONFIG:[]中的每一个{}都对应asset里面相对应的文件夹。
6、output/rarity_weights_data.json可以查看每个元素出现概率。
config参数规范:
1、键:值
示例:
 'id': 1,       # 数字代表图层,越小越下面
 'name': 'background',   # 命名会出现在metadata.csv中
 'directory': 'Background', # asset对应文件目录,一定要一模一样
 'required': True, # 是否必须需要该组件
 'rarity_weights': random, # 稀有度
2、稀有度设定
'rarity_weights'有三种键值
None 每个元素稀有度都相同,若required为True,该组件None的概率也相同
random 每个元素稀有度都相同,若required为True,该组件None的概率也随机
[w1,w2,w3] 第一个元素稀有度w1  / (w1 + w2 + w3)
	       若required为True,确保[]中的数字与对应directory里的图片数目相同
	       若required为False,  确保[]中的数字与对应directory里的图片数目多一个,例如此情况有3个图片权重可以为[1,2,2,3],其中1代表None的权重,后面3个分别代表图像权重。```





generate-nft's People

Contributors

jianghuchengphilip avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.