AI Embedded QR Code Generator and Decoder

Page 1


International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 12 Issue: 03 | Mar 2025 www.irjet.net p-ISSN: 2395-0072

AI Embedded QR Code Generator and Decoder

Mohammad Aasim Shaikh1 , Umer Azmi2 , Niraj Rampal3, Piyush Dubey4, Reena Kothari5

1 2 3 4

Dept. of Information Technology, Shree L. R. Tiwari College of Engineering, Maharashtra, India

5Assistant Professor & NEP Coordinator, Dept. of Information Technology, Shree L. R. Tiwari College of Engineering, Maharashtra, India

Abstract – This research paper presents the design, implementation, and integration of an enhanced QR code system that not only generates and decodes QR codes from diverse data inputs but also embeds these QR codes within AIgenerated artistic images. The project hastwomajorfeatures: first, a robust QR code application that handles multiple data types including text, URLs, emails, WiFi credentials, and contact information and provides accurate decoding from images; and second, an advanced AI module that leverages deep learning models (Stable Diffusion with ControlNet) to generate artistic images that incorporatescannableQRcodes. This integrated approach enhances both the functional and aesthetic aspects of QR codeusage,broadeningtheapplication range from secure data sharing to creative marketing solutions.

Key Words: QR Code, Stable Diffusion, ControlNet, AIGenerated Images, Computer Vision.

1.INTRODUCTION

QRcodeshavebecomeaubiquitoustoolforencodingand sharinginformationintoday’sdigitallandscape.Traditional QRcodesarewidelyusedforsimpletaskssuchasencoding text,URLs,emails,WiFicredentials,andcontactinformation. However, as the demand for enhanced functionality and creative presentation grows, there is an opportunity to expandtheroleofQRcodesbeyondtheirconventionaluses.

This project is about developing an all-in-one QR code systemthatprovidestwomajorfunctionalities:

A. StandardQRCodeGenerationandDecoding:

UserscangenerateQRcodesfromavarietyofinputssuchas text,URLs,emails,WiFiconfigurations,andcontactdetails. The system decodes QR codes from uploaded images, ensuring that data is accurately retrieved even after undergoingpreprocessingsteps.Customizationoptions,such ascolorselection,allowforapersonalizeduserexperience.

B. AI-EmbeddedQRCodeGeneration:

Byintegratingstate-of-the-artimagesynthesismodels,the projectembedsQRcodesintoAI-generatedimages.Theuse of Stable Diffusion, a text-to-image model, in combination with ControlNet a tool for guiding image generation ensuresthattheartisticmodificationsdonotcompromisethe scannability of the QR code. This feature opens up new

possibilitiesincreativemarketingandsecuredatasharingby blendingfunctionalitywithvisualappeal.

2.REVIEW OF LITERATURE

A. QRCodeTechnology

QRcodeswereinventedin1994byDensoWavetoimprove datastorageandrapidscanningcapabilities.Overtime,they have been adopted for diverse applications ranging from industrialusetomarketingandsecuredatasharing.Python librariessuchasqrcodeandpyzbarhavesimplifiedQRcode generationanddecoding,respectively.

B. ComputerVisionandImageProcessing

Advancedcomputervisiontechniques,particularlythrough libraries like OpenCV, facilitate accurate detection and preprocessingofQRcodes.ThesetechniquesensurethatQR codesremainscannableevenwhenincorporatedintoimages withvaryingqualityandcomplexity.

C. DeepLearningandAI-GeneratedImages

Diffusionmodels,suchasStableDiffusion,havetransformed the field of text-to-image synthesis by iteratively reducing noisetogeneratehigh-qualityimagesfromtextualprompts. ControlNet further enhances this process by imposing additional constraints (like structural outlines) that help maintainessentialfeatures suchasthescannablestructure ofQRcodes withinthegeneratedimages.Thespecialized QR Code Monster model, available from Hugging Face, is integratedtoensurethattheartisticaugmentationdoesnot compromisetheQRcodefunctionality.

D. NLPandTransformerModels:

TheincorporationofNaturalLanguageProcessing(NLP)via transformermodels(fromHuggingFace)assistsinaccurately processingandgeneratingtext-basedprompts.Thisaidsin boththegenerationofQRcodesfromdiverseinputsandthe effectivesynthesisofimagecontentthatcomplementstheQR codestructure.

3.PROBLEM STATEMENT

TraditionalQRcodesystems,whileefficientfordataencoding anddecoding,offerlimitedaesthetic flexibilityandarenot designedtoincorporatecomplex,creativedatapresentations.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 12 Issue: 03 | Mar 2025 www.irjet.net p-ISSN: 2395-0072

Thereexistsagapincurrenttechnologiesforcombiningthe practicalityofQRcodeswiththevisualappealandenhanced functionalityofferedbyAI-generatedimagery.Thechallenge istodevelopanintegratedsystemthatmaintainsQRcode functionality across varied input types while enabling creativecustomizationthroughAI-drivenimagesynthesis.

4. OBJECTIVES

A. DevelopaComprehensiveQRCodeApplication:

Enable users to generate QR codes from multiple input formats (text, URLs, emails, WiFi credentials, and contact information). Provide robust decoding functionality that processes and extracts data from QR codes in uploaded images.

B. IntegrateAI-DrivenImageSynthesis:

Utilize Stable Diffusion for high-quality text-to-image synthesis.ImplementtheControlNetextensiontocondition theimagegenerationprocess,ensuringthatQRcodesremain scannablewhilebeingartisticallyenhanced.

C. OptimizeImageProcessingandUserExperience:

Employ computer vision techniques for effective image preprocessing.Developanintuitivefront-endinterfaceusing Streamlit, enabling easy customization and seamless integration of both traditional and AI-enhanced QR code features.

5. PROPOSED SYTEM AND METHODOLOGY

A. QRCodeGenerationandDecodingModule:

Thismoduleisdesignedtohandleavarietyofdatainputs:

o Data Input Handling: Users can select from text, URL,email,WiFi,andcontactinformationoptions. Forinstance,emailQRcodesaregeneratedusinga “mailto” format that includes subject and body, whilecontactdetailsareformattedasavCard.

o QR Code Generation: The system uses the qrcode Python library to generate QR codes with customizationoptions(e.g.,color).

o QR Code Decoding: Images uploaded by users are processedusingOpenCVanddecodedusingpyzbar, ensuringreliabledataextraction.ofresumesinpdf formatforshortlistingapplications.

B. AI-EmbeddedQRCodeModule:

Thismoduleleveragesdeeplearningtoblendfunctionality withcreativity:

o Stable Diffusion Integration: The text-to-image modelgeneratesartisticimagesfromuser-provided prompts.

o ControlNet Extension: By conditioning the generation on the input QR code, ControlNet maintains the QR code’s structural integrity while allowingforcreativemodifications.

o QRCodeMonsterModel:Aspecializedmodelfrom HuggingFacefine-tunesthebalancebetweenartistic enhancementandscannability.

o User Interaction: Through an intuitive Streamlit interface,usersuploadtheirQRcodeimage,inputan artisticprompt,andadjustparameters(likecontrol weightandhigh-resolutionsettings)togeneratethe finalAI-enhancedimage.

C. Front-EndInterface:

o Streamlit Interface: The user-friendly interface consolidatesQRcodegeneration,decoding,andAIembeddedimagegeneration,providingacohesive experience.

6.IMPLEMENTATION

A. SoftwareandLibraries:

o Backend: Python (with libraries such as qrcode, numpy, OpenCV, pyzbar, and Hugging Face transformers).

o Front-End: Streamlitfor developinganinteractive webapplication.

o AIModules:StableDiffusionandControlNet(using an open-source web UI like Automatic1111’s implementation).

B. Workflow:

o QR Code Generation: Users select the input type (text, URL, email, WiFi, or contact). The system generatesacustomizedQRcodeandoffersanoption todownloadtheimage.

o QR Code Decoding: Users upload an image containingaQRcode.Thesystempreprocessesand decodestheimagetoextracttheembeddeddata.

o AI-Enhanced QR Code Generation: Users upload a QRcodeimageandspecifyanartisticprompt.Using Stable Diffusion with ControlNet, the system generatesanimagethatcreativelyembedstheQR codewhileensuringitremainsscannable.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 12 Issue: 03 | Mar 2025 www.irjet.net p-ISSN: 2395-0072

C. FlowDiagram:

Fig-1:FlowoftheProject
D. Results
Fig-2:HomePage
Fig-3:GenerateQRCodePage
Fig-4:DecodeQRCodePage
Fig-5:NewAIQRCodePage
Fig-6:AIPersonalizedPrompts

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 12 Issue: 03 | Mar 2025 www.irjet.net p-ISSN: 2395-0072

7. CHALLENGES AND SOLUTIONS

A. HandlingDiverseDataInputs

Tosupportmultipledataformats,customparsingfunctions wereimplementedfortext,URLs,emails,WiFi,andcontact details,ensuringproperformattingforQRcodegeneration.

B. EnsuringImageQualityandQRCodeIntegrity

High-resolution image generation and precise parameter tuning(usingpreprocessing,denoising,andcontrolweight adjustments) were necessary to maintain the balance betweenartisticcreativityandfunctionalQRcodestructure.

C. BalancingArtisticEnhancementwithFunctionality

ControlNetparameters(controlweight,startingandending controlsteps)werecarefullycalibratedtoensurethatwhile thegeneratedimagesarevisuallyappealing,theQRcode’s scannableintegrityispreserved.

D. UserInterfaceUsability

An intuitive and responsive interface was developed with Streamlit,incorporatinguserfeedbacktoensureaccessibility andeaseofnavigationforbothtechnicalandnon-technical users.

8. CONCLUSIONS

This project demonstrates the successful integration of traditionalQRcodefunctionalitieswithadvancedAI-driven image synthesis. By combining a versatile QR code generator/decoder with the creative capabilities of Stable DiffusionandControlNet,thesystemenhancesbothutility and visual appeal. This dual approach can be applied in various fields from secure data sharing and creative marketingtoinnovativecommunicationchannels.

REFERENCES

[1] Lvmin Zhang,Anyi Rao,Maneesh Agrawala. “Adding ConditionalControlstoTexttoImageDiffusionModels”. IEEE(2023)

[2] Kuldeep Singh Kaswan, Jagjit Singh Dhatterwal,Kiran Malik,Anupam Baliyan. “Generative AI: A Review on ModelsandApplications”.IEEE(2023).

[3] Robin Rombach,Andreas Blattmann,Dominik Lorenz,Patrick Esser,Björn Ommer. “High Resolution Image Synthesis with Latent Diffusion Models”. IEEE (2022).

[4] Loc X. Nguyen,Pyae Sone Aung,Huy Q. Le,Seong-Bae Park,Choong Seon Hong. “A New Chapter for Medical ImageGeneration:TheStableDiffusionMethod”.IEEE (2023).

[5] Yash Raorane, Maithili Wade, Yogita Kadam, Mihir Pawar. “QR Code Generator andDocumentRetrieval”. IJSRD(2023)

[6] SumitTiwari.“AnIntroductionToQRTechnology”.ICIT (2016).

[7] Phaisarn Sutheebanjard, Wichian Premchaiswadi. “QR CodeGenerator”.IEEE(2010).

[8] JaeHwaChang.“AnIntroductionto usingQRCodesin ScholarlyJournals”.ScienceEditing(2014).

BIOGRAPHIES

Mohammad Aasim Shaikh is pursuing his Bachelor of Engineering in Information Technology from SLRTCE, UniversityofMumbai.

Umer Azmi is pursuing his Bachelor of Engineering in Information Technology from SLRTCE,UniversityofMumbai.

Niraj Rampal is pursuing his Bachelor of Engineering in Information Technology from SLRTCE,UniversityofMumbai.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 12 Issue: 03 | Mar 2025 www.irjet.net p-ISSN: 2395-0072

Piyush Dubey is pursuing his Bachelor of Engineering in Information Technology from SLRTCE,UniversityofMumbai.

Mrs ReenaKothariisanAssistant ProfessorandNEPCoordinatorat Department of Information Technology,SLRTCE,Universityof Mumbai.

© 2025, IRJET | Impact Factor value: 8.315 | ISO 9001:2008

|

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.