Table of Contents
ML Days in Tashkent — Day 1: City Tour
In this tutorial, we will take a departure from our regular machine learning (ML) blogs and discover how our authors made the most of the Google for Developers Machine Learning Community Summit in Tashkent. But stick around for a surprise demo at the end.
This blog is the 1st of a 3-part series:
- ML Days in Tashkent — Day 1: City Tour (this tutorial)
- ML Days in Tashkent — Day 2: Sprints and Sessions
- ML Days in Tashkent — Day 3: Demos and Workshops
ML Days in Tashkent — Day 1: City Tour
Arriving at Tashkent!
For us, arriving in Tashkent, the capital city of Uzbekistan, was like stepping into a vibrant tapestry of culture and beauty.
As Google Developer Experts in Machine Learning, we (Ritwik Raha and Aritra Roy) had the distinct honor of being invited by Google to this mesmerizing city. Our invitation was a recognition of our contributions to the Machine Learning community, and the event in question was the much-anticipated annual Google Machine Learning Community Summit.
Tashkent, with its pristine streets and welcoming populace, was a delightful setting for this gathering of minds. The city exuded an instantly captivating warmth, and it was not just the physical beauty of the place that struck us, but also the rich cultural fabric from which it was woven.
You might have noticed some images accompanying this post. And before you compliment us on our photography skills, let’s clear the air: these images are not photographs in the traditional sense. Surprised? Well, that’s the beauty of the field we are immersed in. These vivid images were generated using Stable Diffusion, a state-of-the-art technique in Machine Learning, and it only took us four lines of code to create them! If you’re curious about how this was done, stay with us as we delve deeper into this fascinating topic.
Our journey in Tashkent began at the luxurious Hotel InterContinental, where 11 of us from India converged. After a quick check-in, we parked our luggage and immediately set off to explore the city. The excitement was palpable among us, not just for the summit, but also to experience the essence of Tashkent through its streets, monuments, and people.
As we embarked on our city tour, we were constantly reminded of how beautiful and vibrant this land is. The upcoming summit promised to be a confluence of ideas and innovations, where experts from various countries would share their insights and experiences.
City Tour
Tashkent as a city has so many tourist places, we could not see all of them. Here are some of the sites we visited.
Our tour of Tashkent was an eye-opener to the rich history and culture of Uzbekistan. Though we couldn’t visit all the tourist spots, the ones we did explore left an indelible mark on us. Here’s a glimpse into some of these remarkable places.
Memorial to the Victims of Repression
This memorial is an imposing structure with a large, gazebo-shaped design topped by a striking blue dome. It’s not just the architecture that captivates you, but the poignant story it tells. Adjacent to it is the Museum of the Victims of Political Repression. This structure, albeit beautiful, carries a somber tale. It is dedicated to the brave souls who fought for Uzbekistan’s independence during the Soviet era and tragically lost their lives at the hands of the government. The museum houses photographs, documents, and personal belongings of those who were killed, serving as a powerful reminder of their sacrifice.
Barak Khan Madrasa
Our visit to the Barak Khan Madrasa was an introduction to the splendid Islamic architecture that is prevalent in Uzbekistan. These structures, found elsewhere as well, are a testament to the rich cultural heritage of the country. The courtyard of the Barak Khan Madrasa is open to visitors, offering a serene and introspective experience.
Minor Mosque
The Minor Mosque is a relatively new yet magnificent addition to Tashkent’s skyline. Built in 2014 along the Ankhor Canal, it’s fondly known as the “Snow Mosque” due to its pristine white marble construction. The mosque is a sight to behold, especially when sunlight dances off its surfaces, making it shimmer and sparkle.
Chorsu Bazaar
A visit to Tashkent would be incomplete without experiencing the Chorsu Bazaar, Uzbekistan’s largest market. Here, the vibrancy of local life is on full display. From fresh produce, spices, honey, and food products to clothing, jewelry, and beauty items, you can find almost anything here. The bazaar is a bustling hub of commerce and culture, offering a slice of everyday life in Uzbekistan.
Metro Ride Back to the Hotel
The journey back to our hotel was via the oldest Metro in Central Asia. Each station is a work of art in itself, reflecting the country’s rich history and culture. What truly stood out, however, was the warmth and politeness of the people. Despite the busy rush, everyone we encountered was warm, welcoming, and full of smiles.
Generating Images with Stable Diffusion
As we retreated to our hotel, our minds were filled with images and stories, some uplifting and some poignant, all of which enriched our understanding of this beautiful country.
And now, finally, as promised, let us see how to generate photo-realistic images (ahem!) using Stable Diffusion with Keras-CV in about 4 lines of code.
!pip install -q git+https://github.com/keras-team/keras-cv.git@master !pip uninstall -q keras -y !pip uninstall -q tensorflow -y !pip install -q tf-nightly # needed for some data processing in keras-cv !pip install -q keras-nightly
On Lines 1-5, we start by installing the necessary Python packages. We install keras-cv
directly from its GitHub repository, uninstall existing versions of keras
and tensorflow
, and then install the nightly builds of TensorFlow (tf-nightly
) and Keras (keras-nightly
). These nightly builds are often used to access the latest features and bug fixes that haven’t been released in stable versions yet.
import os os.environ["KERAS_BACKEND"] = "torch" import keras import keras_cv
On Lines 6-9, we import essential Python libraries. os
is a standard Python library, with os
being used to set environment variables. Here, we are using the “torch” backend. To learn how to use Keras Core with different backends, read our blog post on Keras Core.
The keras
and keras_cv
imports are for using Keras and its computer vision extensions, respectively.
stable_diffusion = keras_cv.models.StableDiffusion() stable_diffusion.jit_compile = False # this is work in progress prompt = """"machine learning summit in the city of tashkent, with \ the theme of a middle-eastern market where spices and tea is made of code elements""" images = stable_diffusion.text_to_image( prompt, batch_size=3, )
On Lines 10 and 11, we initialize a StableDiffusion
model from keras_cv.models
. This model is used for text-to-image generation. We then set its jit_compile
attribute to False
, indicating that the just-in-time compilation is disabled. This might be due to the model still being in a developmental stage.
On Lines 16-19, we use the stable_diffusion.text_to_image
method to generate images based on a given text prompt. Here, the prompt describes:
"machine learning summit in the city of tashkent, with \
the theme of a middle-eastern market where spices and tea is made of code elements"
Feel free to input your own prompts.
We specify a batch_size
of 3
, indicating that three images will be generated.
keras_cv.visualization.plot_image_gallery( images, value_range=(0,255), scale=2, rows=1, cols=3, show=True, )
Finally, on Lines 20-27, we call the keras_cv.visualization.plot_image_gallery
function to display these generated images.
Note: PyImageSearch is not responsible for any biased representation of generated images.
Summary
As we wrap up our recount of the vibrant city tour in Tashkent, let’s shift our focus to the main reason for our visit: the Google Machine Learning Community Summit. This event was not just a typical conference; it was a unique blend of advanced learning, hands-on experience, and cultural immersion.
A Peek into the Google ML Community Summit
The summit was a melting pot of ideas and innovations in the Machine Learning field. It was fascinating to see how Google, a pioneer in this field, orchestrated an event that was both informative and enjoyable. In our upcoming posts, keep an eye out for detailed insights into what the summit entailed. We’ll be diving deep into state-of-the-art ML products and APIs showcased at the event.
Expect to find a mix of technical deep dives and practical demonstrations. Whether you’re a seasoned ML practitioner or a curious enthusiast, there will be plenty of material to get your hands dirty with. We’ll share our experiences with the latest tools and technologies, giving you a firsthand look at the advancements shaping the future of ML.
A Balance of Enjoyment and Learning
One of the most impressive aspects of the summit was how Google managed to strike a perfect balance between a rigorous technical conference and an enjoyable experience. The sessions were packed with updates and new releases, yet there was always an undercurrent of excitement and engagement. This balance made the learning process not just enriching but also incredibly fun.
Gratitude to Tashkent
As we prepare to delve into the technicalities and learnings from the summit, we express our heartfelt gratitude to the city of Tashkent and its wonderful people. The warmth, hospitality, and rich culture we experienced here added a special flavor to our journey. It wasn’t just a trip; it was an experience that gave us memories to cherish for a lifetime. To the beautiful city of Tashkent and its incredible people: Thank You.
Stay tuned for our upcoming posts, where we’ll share the technical treasures from the Google ML Community Summit. We’re excited to bring you along on this journey of exploration and discovery in the world of Machine Learning.
Join the PyImageSearch Newsletter and Grab My FREE 17-page Resource Guide PDF
Enter your email address below to join the PyImageSearch Newsletter and download my FREE 17-page Resource Guide PDF on Computer Vision, OpenCV, and Deep Learning.
Comment section
Hey, Adrian Rosebrock here, author and creator of PyImageSearch. While I love hearing from readers, a couple years ago I made the tough decision to no longer offer 1:1 help over blog post comments.
At the time I was receiving 200+ emails per day and another 100+ blog post comments. I simply did not have the time to moderate and respond to them all, and the sheer volume of requests was taking a toll on me.
Instead, my goal is to do the most good for the computer vision, deep learning, and OpenCV community at large by focusing my time on authoring high-quality blog posts, tutorials, and books/courses.
If you need help learning computer vision and deep learning, I suggest you refer to my full catalog of books and courses — they have helped tens of thousands of developers, students, and researchers just like yourself learn Computer Vision, Deep Learning, and OpenCV.
Click here to browse my full catalog.