Nm1022-Naan Mudhalvan 3
Nm1022-Naan Mudhalvan 3
Nm1022-Naan Mudhalvan 3
LABORATORY
Pixel Intelligence:
Next-Gen AI Stock Image for Creators
Project Created By
SRINIVASAN.R , MADHAN.M , BARATH RAJ.S , PREMANAND.V
Contents
1. Project Objective: ………………………………………………3
2. Scope: ………………………………………………………………..4
3. Methodology: …………………………………………………….5
4. Artifacts used:…………………………………………………....7
5. Technical coverage:…………………………………………….8
6. Project Coding:……………………………………………………11
7. Results:……………………………………………………………….17
8. Challenges and Resolutions:……………………………….18
9. Conclusion:…………………………………………………………19
10.References:…………………………………………………………20
Project Objective:
The objective of Pixel Intelligence is to launch a platform that utilizes AI to generate
and curate stock images, catering to the needs of photographers and digital artists. The
platform aims to provide a valuable resource for content creators seeking high-quality
images for their projects.
1.Agile Development:
Agile development emphasizes flexibility,
collaboration, and continuous improvement,
enabling the project team to adapt to changing
requirements and deliver value incrementally.
2.Design Thinking:
Design thinking focuses on understanding user
needs and creating solutions that are both innovative
and practical.
3.AI-Driven Innovation:
AI-driven innovation leverages advanced
machine learning techniques to create a powerful
and adaptive image generation platform.
ARTIFACTS USED:
Category Artifact Description
• GANs (Generative
1.AI Models and Algorithms •Used for generating high-quality images.
Adversarial Networks)
5.Data Storage and Management • Databases •For storing images and metadata.
• CDN (Content Delivery
•To deliver images quickly to users globally.
Network)
TOOLS USED:
OpenAI's GPT (Generative Pre-trained Transformer) Models:
OpenAI has developed powerful language models like GPT-3 that can generate human-
like text based on input prompts. These models can be fine-tuned for tasks such as
generating image descriptions or interpreting user input.
DeepAI Text to Image API:
DeepAI offers an API that can generate images from textual descriptions using deep
learning techniques. This API can be integrated into the ArtiGenius platform to generate
images based on user-provided descriptions.
ChatGPT :
ChatGPT is a free-to-use AI system. Use it for engaging conversations, gain insights,
automate tasks, and witness the future of AI, all in one place.
Copilot :
Copilot is a conversational chat interface that lets you search for specific information,
generate text such as emails and summaries, and create images based on text prompts you
write.
Starryai :
Create Beautiful Visuals with our AI Image Generator .Transform your words into
stunning visuals using the starryai Image Generator. Just add your detailed description and
watch as your imagination comes to life through AI.
TECHNICAL COVERAGE:
1.AI Model
Framework: TensorFlow/PyTorch
Description: TensorFlow and PyTorch are the primary frameworks used for developing
the AI models. These frameworks provide the tools necessary for creating, training, and
deploying sophisticated neural networks.
Benefits: High performance, extensive libraries, support for distributed computing, and
strong community support.
2. Backend
I. Server: Node.js/Express
Description: Node.js with Express framework is used to handle API requests, manage
server-side logic, and connect with the frontend and database.
Benefits: Efficient handling of concurrent requests, non-blocking I/O operations, and a
large ecosystem of packages.
II. Database: MongoDB
•Description: MongoDB is used for storing user data and image metadata. It is a NoSQL
database that allows for flexible schema design and efficient storage of large datasets.
•Benefits: Scalability, flexibility in data modeling, and high performance for read/write
operations.
3. Frontend:
i. Framework: React.js
Description: React.js is used for building the user
interface, providing a responsive and dynamic user
experience.
Benefits: Component-based architecture, fast
rendering with Virtual DOM, and a rich ecosystem
of libraries and tools.
ii. Design:
Description: The design focuses on creating a
responsive and intuitive interface that ensures ease
of use across different devices.
Benefits: Enhanced user experience, accessibility,
and a modern look and feel that appeals to users.
iii. Features
Description: Allows users to find images based on
specific criteria and prompts. Provides options for
users to customize images (e.g., adjust colors, add
filters).Enables users to download images in various
resolutions and formats.
Benefits: Improved functionality and user
satisfaction, enabling users to get precisely what they
need quickly and efficiently.
Project Output Design:
Generating Step…
Get The Image :
What that we
want??
PROJECT CODING:
Frontend Coding: java , css , javascript ,React js
Java:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pixel Intelligence</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="app">
<h1>Pixel Intelligence</h1>
<input type="text" id="prompt" placeholder="Enter image prompt">
<button onclick="generateImage()">Generate Image</button>
<div id="imageContainer"></div>
</div>
<script src="script.js"></script>
</body>
</html>
CSS:
body {
font-family: Arial, sans-serif; Java Script:
text-align: center; async function generateImage() {
margin: 20px; const prompt =
} document.getElementById('prompt').value;
#app { const response = await fetch('/generate-
max-width: 600px; image', {
margin: auto; method: 'POST',
} headers: {
input { 'Content-Type': 'application/json'
width: 80%; },
padding: 10px; body: JSON.stringify({ prompt })
margin-bottom: 10px; 12 });
const data = await response.json();
} const imageContainer =
button { document.getElementById('imageContainer')
padding: 10px 20px; ;
} imageContainer.innerHTML = `<img src="$
#imageContainer img { {data.imageUrl}" alt="Generated Image">`;
max-width: 100%; }
margin-top: 20px;
}
React JS:
// App.js
import React, { useState } from 'react';
import axios from 'axios';
function App() {
const [prompt, setPrompt] = useState('');
const [generatedImage, setGeneratedImage] = useState('');
const handleGenerateImage = async () => { 13
};
return (
<div className="App">
<h1>Pixel Intelligence</h1>
<input type="text" value={prompt} onChange={(e) => setPrompt(e.target.value)}
placeholder="Enter image prompt" />
<button onClick={handleGenerateImage}>Generate Image</button>
{generatedImage && <img src={generatedImage} alt="Generated Image" />}
</div>
);
}
export default App;
Python:
from flask import Flask, jsonify, request
from flask_pymongo import PyMongo
app = Flask(__name__)
app.config['MONGO_URI'] = 'mongodb://localhost:27017/pixel-intelligence'
mongo = PyMongo(app) 15
app.route('/api/images', methods=['GET'])
def get_images():
images = mongo.db.images.find()
return jsonify({'images': images}), 200
app.route('/api/images', methods=['POST'])
def add_image():
prompt = request.json.get('prompt')
image_url = request.json.get('imageUrl')
if not prompt or not image_url:
return jsonify({'error': 'Bad Request'}), 400
new_image = {'prompt': prompt, 'imageUrl': image_url}
mongo.db.images.insert_one(new_image)
return jsonify({'message': 'Image added successfully'}), 201
if __name__ == '__main__':
app.run(debug=True)
Output:
{
images: [
{
id: {"$oid": "609d04f7b8a741399c90c70e"},
prompt:Generate high-quality images of nature scenes",
imageUrl: "https://example.com/image1.jpg"
},
{
id: {"$oid": "609d0531b8a741399c90c70f"},
prompt: "Generate high-quality images of seashores",
imageUrl: "https://example.com/image2.jpg"
}
Database Coding(Mongo DB):
// models/Image.js
const mongoose = require('mongoose');
const imageSchema = new mongoose.Schema({
prompt: { type: String, required: true },
imageUrl: { type: String, required: true },
createdAt: { type: Date, default: Date.now }
});
const Image = mongoose.model('Image', imageSchema);
module.exports = Image;
RESULTS
REFRENCES:
AWS Documentation: https://docs.aws.amazon.com/
React Documentation: https://reactjs.org/docs/getting-started.html
TensorFlow Documentation: https://www.tensorflow.org/overview
AI and Image Generation:
https://DALL-E 2.com/
https://deepai.org/
WEB Development:
https://chatgpt.com/
https://openai.com/
Database Management:
https://www.bing.com/chat?form=NTPCHB