Coder Social home page Coder Social logo

nft-image-generator's Introduction

Benyamin Ahmed โœจ

Hello and welcome to my world. ๐ŸŒŽ

Here you will find various projects that I have been working on. As you can see from my profile pic I am still at school ๐Ÿซ. Apart from coding ๐Ÿ’ป I also love swimming ๐ŸŠ and taekwondo ๐Ÿ‘Š.

Follow me on my YouTube channel ๐ŸŽฅ BenoniChannel where you will find me pushing stuff about coding, memes and life. (I have more than ๐Ÿ’ฏ subscribers and I โค๏ธ everyone of them!)

You can also catch me on Codewars where I am currently playing around with JavaScript. ๐Ÿ˜Ž

Follow my journey on Twitter. ๐ŸŒ„

Stay safe and keep on coding! ๐Ÿ˜ท

P.S For those of you who are curious ๐Ÿ”Ž, I can't eat gluten ๐Ÿฐ & ๐Ÿท and my favourite animal is a ๐Ÿฏ!

Let's build some cool ๐Ÿ’ฉ

nft-image-generator's People

Contributors

bachetesla avatar benyaminahmed avatar buddybob avatar yusufahmed-ya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nft-image-generator's Issues

How to make a layer optional?

Hello. For example, your Weird Whales have mouth accessories, but not all. Hot to make this layer with mouth accessories optional?

I need a small bit of guidance

Hello,

Thanks for generating the code. I'm having some difficulties running it. I have tried following the steps you have put out - I installed python, pip, python pillow and have tried several times to get a ui for jupyter notebook. I settled with JupyterLab. However, I don't know how to duplicate my nft image., or the ideal commands to run. Can I have some guidance?

Thanks!

IMAGES_BASE_URI

Not so much an issue, more a question.

IMAGES_BASE_URI

Under the meta_data generation line, this needs to be input manually correct? So if I was to upload onto IPFS, I would need to manually go in and add the IPFS link.

Thanks!

How to make a layer optional?

Hello. For example, your Weird Whales have mouth accessories, but not all. How to make this layer with mouth accessories optional?

editin python code w/ 4 variables

hi ,
im really new this and i need some help. i change the background to png instead of jpg, because my file was a png. But i'm getting this error.would really appreciate some troubleshooting help

im1 = Image.open(f'./layers/background/{background_files[item["background"]]}.png').convert('RGBA')
4 im2 = Image.open(f'./layers/mouth/{mouth_files[item["mouth"]]}.png').convert('RGBA')
5 im3 = Image.open(f'./layers/spoon/{spoon_files[item["spoon"]]}.png').convert('RGBA')

/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PIL/Image.py in open(fp, mode, formats)
2966
2967 if filename:
-> 2968 fp = builtins.open(filename, "rb")
2969 exclusive_fp = True
2970

FileNotFoundError: [Errno 2] No such file or directory: './layers/background/purple.png'

Required trais

Really grateful for the script!
How would you go about specifying whether a trait is required and not roll it at all for some images while omitting it from the list of traits?

Creating images

When replacing the images I have an error 'ValueError: images do not match'. Does anyone know how the images should be saved? Any advice would be helpful. Thank you!

How to run application

Hi there

How does one run this generator within Jupyter?
I've used the generate.ipynb file within Jupyter but nothing happens. It's seems to throw some sort of error. Please if you can maybe explain in more details or upload some screenshots of what the code should look like in order to function?

Thank you.

Thankyou

made my 10000 images with 5 layers . The hard part was the Image.alpha_composite
love from India . You are a legend in this country

you introduced me to NFT actually
Do continue coding

How are you making the whale images?

I've looked everywhere in your code and can only find squares circles and images. I don't see where you made the accessories like the hats, cigars, and eyes. And where are your whale bases located?

Recursion error

When I set the TOTAL_IMAGES = 10000

I get a recursion error:

RecursionError Traceback (most recent call last)
/var/folders/j7/byspn9bd3rddg31124_fldnm0000gn/T/ipykernel_2323/1847067360.py in
28 for i in range(TOTAL_IMAGES):
29
---> 30 new_trait_image = create_new_image()
31
32 all_images.append(new_trait_image)

/var/folders/j7/byspn9bd3rddg31124_fldnm0000gn/T/ipykernel_2323/1847067360.py in create_new_image()
20
21 if new_image in all_images:
---> 22 return create_new_image()
23 else:
24 return new_image

... last 1 frames repeated, from the frame below ...

/var/folders/j7/byspn9bd3rddg31124_fldnm0000gn/T/ipykernel_2323/1847067360.py in create_new_image()
20
21 if new_image in all_images:
---> 22 return create_new_image()
23 else:
24 return new_image

RecursionError: maximum recursion depth exceeded in comparison

Setting the sys recursion limit to 10k [sys.setrecursionlimit(10000)] doesn't make a difference, in fact the error is throw with any image # above 5775

Any ideas? Thanks!

Help

I keep getting this error, also is there any way to acutallty have the same name for an image but different images?

Screen Shot 2021-08-31 at 5 45 11 PM

For example I want the traits to have a "bowtie" but that "bowtie" be multiple images. Notice how there's a colorful properties but they're different colors.

Screen Shot 2021-08-31 at 5 47 33 PM

Maximum recursion depth reached

Thanks a lot for this awesome notebook! One problem I'm running into is I'm hitting the maximum recursion depth when trying to generate more than about 200 images. My setup has 8 layers, with 1-5 variants in each, but if I set TOTAL_IMAGES higher than about 250, I hit the limit. I'm trying to generate 10,000 images, so kind of stuck.

This is the error I'm seeing:

  File "/Users/zac/.pyenv/versions/3.9.4/lib/python3.9/random.py", line 498, in choices
    return [population[bisect(cum_weights, random() * total, 0, hi)]
  File "/Users/zac/.pyenv/versions/3.9.4/lib/python3.9/random.py", line 498, in <listcomp>
    return [population[bisect(cum_weights, random() * total, 0, hi)]
RecursionError: maximum recursion depth exceeded in comparison

One detail is I used nbconvert to convert the notebook to a python script so it can be run via script.

I did find to add this line:

import sys
sys.setrecursionlimit(65532)

However, that just changes the error to segmentation fault when I try to go higher than 250. Any thoughts?

What is the use for this application

I successfully ran the application and it has generated some weird images in the images folder. Now I am not sure about the next steps to be followed. Can we upload these images to Opensea? I don't think no one will buy these images and all of them look similar.

Anyone here know what to do ?

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.