This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streamlit as st | |
import cv2 | |
from PIL import Image,ImageEnhance | |
import numpy as np | |
import os | |
import PIL.ImageOps | |
imagefile = st.file_uploader("Upload Image",type=['jpg','png','jpeg']) | |
if imagefile is not None: | |
image = Image.open(imagefile) | |
opencvImage = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR) | |
st.text("Original Image") | |
st.image(image) | |
#Create Gray Scale Image | |
st.markdown('**Grey Image Genration:**') | |
greyimagetask = st.button('Generate grayscale image') | |
if greyimagetask: | |
gray = cv2.cvtColor(opencvImage, cv2.COLOR_BGR2GRAY) | |
st.image(gray) | |
st.markdown('**Negative Image Genration:**') | |
#Create Negative Image | |
negativeimagetask = st.button('Generate negative image') | |
if negativeimagetask: | |
inverted_image = PIL.ImageOps.invert(image) | |
st.image(inverted_image) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conda create --name visionexperiment | |
conda activate visionexperiment | |
conda install pip | |
pip install -r requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anaconda-client | |
dlib==19.21.1 | |
imutils==0.5.4 | |
numpy | |
opencv-python==4.5.1.48 | |
scikit-image==0.18.1 | |
scipy==1.6.3 | |
tensorboard | |
tensorboard-data-server | |
tensorboard-plugin-wit | |
tensorflow | |
tensorflow-estimator | |
streamlit |
Happy Learning!!!!
No comments:
Post a Comment