Welcome to the pearl of Africa, Uganda and I know the only city that comes into your mind when you hear the name Uganda is Kampala. Do you know that Kampala is used to be the city of impalas but now there are no more impalas in the city. But let me just brief you about the origination of the name Kampala. The hills where Kampala sits, some of the hills were known to be homes of impalas and in the local language they were known as Akasosi Kampara. Akasosi meaning hill, so in the translation Akasosi Kampara, the name Kampara originated. A hill of impalas, so Kampara. The land of impalas is occupied by humans so now where is the new home of the impalas? This is why I want to embark on a journey with the Uganda Tourism Board to the west of Uganda. Uganda is one of the four regions in Uganda and I believe that it's the most characteristic region in the whole of Uganda because there are so many places to explore in this beautiful region. In places the sun is shining, we drive a few kilometers and it starts raining and listen, the best part of it all is the endless scenic view that I'm seeing. My goodness, like nobody ever told me that road trips in Uganda would be disenjoyable. I mean, looking for me. Can you guys see? Listen, if you ever visit Uganda, I don't think you need to use planes within the country.  And I don't know why Uganda's are saying that it's a dry season. I've never seen a dry season that everywhere looks green. I mean everywhere we go, it's raining and these guys are saying it's dry season. I guess that's why they call it the Pail of Africa. So in the Pail of Africa, even if it's dry season, it rains. I've never been to heaven before but I think this is how heaven looks like when it shows. No, the western Uganda is really surprising me because of the greens that I'm seeing. Imagine if you live here. You know, you will live so long. Like I'm surrounded by green man, look at that. Just look. Thank you, the tourism board of Uganda for making this dream come true. Explore Uganda, the Pail of Africa. You want to say something? Love you guys. Come and explore Uganda. Turning to the west to stop by at the equator. I don't know if most of you know that Uganda is one of the 13 countries that the equator passes through. And we had to try the equator experiment. You're going to do a geographic experiment to prove that the process of north and south will spin the same. Kampala, Jingea, Teve, USA, German Netherlands. Whenever they flush their toilets or sink, the water spins blow-push. And then the reason why I put this metal is to make the outer step. So here I'm trying to make the outer step. Still, the reason why I put this flower is that you can see the outer spinning with your eyes. It's not spinning.  Oh! But when I put the flower, it's spinning. So if you live in Kampala and crush the toilets. No, it spins blow-push. Then Masakatu, Telambalala, South Africa, Transania, Rwanda. It is south of the spins. Antiquity. Oh! For the only speakers. For the only speakers. So south of Polpol is Antique, not Polpol is Polpol. Where the process meets, it's the actual equator line. Which in the 13 countries that are crossed by the equator line in the whole world. That is Iquado, Colombia, Brazil. That is South America. South Ome, Gabon, Congo, Brazil, Congo, Dara Sea, Uganda, Kenya, Somalia. That is Africa. Seven. Then Indonesia, Gorontalai. That's the equator line. Yes. And at the equator line in the middle of the world. Don't let it spin. That's what's good. You go that way. It doesn't spin. Don't let it spin. That's what's good. So I'm going to start experimenting. Do you have the flower? Yeah. You're going to put the flower. Because in the middle, it does not bring the sport. So it goes straight down without bringing the sport. So you're going to put the flower. I don't believe you. Unless I do it fast. Okay. You don't force it. You just put the flower in the top. So what happens is you have to put the flower in the top. You put the flower in the rotation. No claw points. No ants. Because it's in the middle of the world. You also put a certificate. Just in case you want to put a certificate. This is the knot. If you put it, it's going to fall. If you put it here, it's going to fall. So you need to put it on the equator. Which has zero latitude. It's a zero latitude, right? But I don't know how. All the time. I feel. Are you sure it's going to be stable? Yeah. Try it. See. But my hand is shaky. My hand is shaky. It's the wind, you know. You have to block the wind. This direction is the side. You see? Ah! I don't know why I cannot achieve this man. So now the egg is flat. The wind. Because I'm really living my best life in Uganda. I never knew Uganda is this beautiful. I never knew such a beauty exists in this beautiful country. I was so shocked to see that Uganda actually has safari parks where you can explore, where the game drives. Good for canoeing, bedside. This is something that I never imagined that. It exists in Uganda. You see? The bed right behind me. That is the Ugandan crane. This is the national bed for Uganda. If you know the football team for Uganda, it's called the Uganda crane. This is where it got its name from. And this is the beautiful hotel that we slept last night called Gungo Country Hotel. It's a beautiful hotel. It's affordable. And I love the fact that it's so green. I don't know why, but I'm a big fan of greens. And I'm living my best life in here. Inside in Gungo Country Hotel, you get a chance to learn about the history and the culture of the people of Uganda. Which I believe it was an eye opener. This is a museum of where you are and it is all about the culture of southwestern Uganda. Those are mainly the one you are calling and also the particular people. So it is all about our culture and that's what we shall look at it. When we look at this, this is a kind of, we call it an Albertan lift valley or you can call it as a sketch mark. Our way by, it shows some of the tools and restrictions that we find in western region. Mainly the national parks. As you know Uganda we have almost 10 national parks and western region we have 8 of them. And there are only some kind of 2, which are the other side that is deeper and also action forms. So here mainly Ambarara, this area where you are, it is called the Bihari and it is in Barara city. And this is where we are and we have Alikimburu in Barara. So this is Alikimburu where we mostly find the zebras and it is also among the smallest national parks that we have. I know my wife was attacking Uganda because she said she never knew that it is possible to do safari in Uganda. Neither did I know that it is possible to do this in this beautiful country. To do your research on the internet you will see that Uganda got the lowest tourist turnout in the whole of East Africa. You know what? Because Ugandans are not telling us that you can actually have the best safari experience in the pearl of Africa. And believe me or not, it is the most affordable compared to their neighbors. That's more in palace, right? Okay, more in palace. On our left-hand side, we have the impalas, the males as well, and then the water bugs in the background. They are females and they are living with the dominant male. Water bugs like their names are guests. They like associating with waterlogged presses and once they get scared they release their glands making their body smell badly, making their meat taste bitter. What? In case the predators chase and kill on them they may not enjoy the meat. The best way is a surprise attack. It doesn't mean that the predators don't go for them. They can kill them but then they may find the meat when it is not good and they can leave the cacas. The vultures and hyenas for them they don't care whether it is bitter or smelly, they can eat. I can't believe that we are doing this in Uganda. This is incredible, full of thoughts. We just showed Kenya in Tanzania when it comes to water. But never in Uganda got a lot to offer. Me I'm shocked. You're shocked? You saw zebra? I never expected a ride from a zebra. Because zebras have a soft and a weak backbone and they cannot be ever to carry any weight on their back. They as well have smaller hooves. So if they happen to carry heavy weight their hooves can easily sink in the ground. They have the black and white stripes and those stripes look different from one another just like our finger prints. What is Pumba right now? Many people call them Pumba like you're calling men. And in a short distance they forget why they are running. So they stop and start racing. What language is Pumba? Pumba means trophies. Oh my goodness. I never knew man. What are you doing? Look at them pallets. So many pallets man. One thing that I really enjoy about this National Park is the fact that all the animals are moving together. Even if they are different species. Wow. And this is how humans should learn to live. You know you guys need to live together. Even animals know how to live together. How much more than women? I'm saying women. The shores of Lake Igburu. This is where the National Park got its name. It's different from Lake Victoria. Wow. That's so beautiful. Oh okay. This is cheese. Believe me or not. I never knew Uganda is this beautiful ground. Whoa. Look at that. No the view man. This is Uganda. Oh my goodness. Welcome. Now I know why they call this place the Pail of Africa. Welcome to Uganda. Yo. I'm so glad. Am I safe? I'm so glad I came back to Uganda. Because I never knew that such beauty exists in the Pail of Africa man. Oh my goodness. I can't wait to show you all the best of Uganda man. This is unbelievable. Look at that. Lauren is the best teacher ever. I mean traveling is the best teacher ever. I mean I've been to Rwanda and when we started driving here we asked the driver why do we feel like we are in Rwanda and he said hey we are just 15 kilometers away from Rwanda so where we are is called Kapale and you see this road right in front of me if you drive 50 kilometers straight you'll be in Rwanda which is incredible man. This is what I've been saying. Africans are just one people and it's about time we clear all these borders so that we all can live together one harmony and just enjoy ourselves as Africans but at the end of the day we have a border that says that this is Uganda and that place is Rwanda. This district or town that we are is known for mountain gorillas that's how you see gorillas sculptures everywhere we go through. After four hours we are finally at our final destination. This is our final destination. No. We are actually here to just have lunch we are currently at oh my goodness that's a kitchen I'm sorry look what a beauty man what's the name of the lake? Monyoni oh my goodness and the weather changed drastically like I feel so cold right now oh my god look at the view oh my god the best thing that has ever happened to me is to come into the western Uganda man look at me having my all time favorite chicken wings with my wife sitting next to me in a million dollar view right in front of me God bless me God bless Africa God bless Uganda God bless Rosu I've never been here before and I'm just hoping that this video will inspire them to come and see this place.


Navy husband comes home to find wife was keeping a life-changing secret. US Navy sailor Chris Diarty was due to deploy in January. It wouldn't be his first tour abroad. Nor would it be the first time he'd have to spend a prolonged period away from his family. Diarty was initially expecting to be at sea for five months. However, sometime after setting sail, the Navy man would learn that his deployment would actually end up lasting longer than he'd first thought, but that wasn't the only unexpected twist heading his way. Little did Chris know at the time, but he'd eventually come home to the shock of his life. As respectable as it is, life as a military spouse isn't always easy. And Chris Diarty and his wife, Natasha, were no strangers to the sacrifices of that lifestyle. Staying away from your loved ones for long periods of time can be soul-crushing. The young Temecula California couple had three young children, and it never got any easier when deployment time came around. There were smiles amid the tears when petty officer Chris Diarty's whole family came to port to send him off when he deployed on the USS Vincent. Little did they know that by the time Christ would come back home, everything would be different. Working overseas for so many months would affect anyone's relationship with their family, especially with their wife and kids, and Christ was completely aware of this as he'd witnessed a lot of families falling apart because of it. Christ was heading to the waters off of the Korean Peninsula, where he would work as a Navy cryptologic technician. Diarty would spend his days deciphering codes and signals, but he'd have no clue as to something that was happening back home. As is the case with many military spouses and army wives, it didn't take long for Natasha Diarty to feel the pangs of loneliness that are unique to missing your partner. It was only about a week after Chris had shipped out though, when Natasha started subtly changing her ways. The changes were small at first, but with each passing week, it became harder and harder to conceal the truth. As time passed, however, there was one person in particular back home to whom Natasha was extra careful not to reveal her whole story. With three children at home and her husband away in the Navy, Natasha Diarty had her hands plenty full. Caring for three kids on your own is not an easy job.  Natasha had to confront her fears and do her best. It's hard to stick to your regular schedule when your life turns upside down, that's something every military wife knows. Natasha felt overwhelmed and as she started to change her state of mind, she couldn't help but notice that other things were also changing. She was aware of it, but keeping it a secret from everyone else turned out to be a challenge. While her firstborn was old enough to understand that he should keep quiet about the differences with his mother, it wasn't as easy to keep everyone hush-hush. It became incredibly hard to manage all of her three kids. The mother of three found it most difficult to keep up appearances of normalcy with her four-year-old. Since the family was able to speak with Chris on a regular basis, Natasha couldn't help but be concerned that her little girl would mention something that would raise his suspicions. Although she barely had a minute to spare, Natasha Diarty was in turmoil over the dilemma of whether to tell her husband something that would inevitably have a huge impact and change both of their lives forever when he returned. Chris was thousands of miles away from home and she knew to reveal the truth while he was so far away would just make him anxious and distracted. It would have made it so much harder. The situation was intensified by the fact that the family kept in touch on a regular basis. They would make video calls, speak on the phone and share photos online, but Natasha constantly worried that Chris would notice she was hiding something. She did her best and tried not to send him photos from home, especially not of herself. The fear that he would be able to tell that she's hiding something, just by looking at her face, was soul-crushing but necessary. She couldn't interfere between her kids and their father though. Natasha and Chris Diarty had first met when they were both working in the Navy. At the time, Natasha was working as an IT systems technician and Chris was smitten. He couldn't believe that he'd meet such a beautiful, intelligent woman with whom he had so much in common. The couple wed in 2011 and after years of marriage keeping something of such gravity from Chris was extremely difficult and unprecedented for Natasha. At one point soon after Chris had deployed, the 28-year-old Natasha had intended to come clean to her Navy husband, but ultimately she decided against it. I emailed him and I told him to call me as soon as he gets a chance, but then I thought about it for a few minutes and I was like, you know, this isn't how I want to tell him. In an email, Natasha recalled. Not only did Natasha want to conceal her big secret from Chris, but she didn't want their friends or extended family to find out either. It wouldn't be long though until perceptive loved ones would notice what had transpired. To keep afloat, Natasha was back home working two jobs and taking care of three little kids while Chris was serving his duty for the country. For anyone else, it would have been easy to sink under all the pressure. Natasha had already made it thus far it, but it hadn't been simple. It wasn't an easy time for Natasha and there were so many occasions when she desperately wanted to break the silence and let her husband know what was going on. Natasha only had a week to go until Chris and pending homecoming when she received unexpected news that made her question everything. After five grueling months, Chris called from his station to tell Natasha that his tour had extended by an extra 30 days. The addition to his deployment had been made after North Korea began testing ballistic missiles. Surprisingly, she was relieved. But soon the pressure became unbearable. As international tensions rose, so too did Natasha's anticipation skyrocket. She was about to burst and just tell Chris what she'd been keeping from him. She couldn't wait any longer. Ultimately though, she decided it would be best to hold on for another month and that she'd use all her strength to keep it under wraps until then. Everyone around her became suspicious as well, but Chris would soon come home and he would have to face what his wife did. Despite her adamant decision to wait until her husband was home to tell him what would inevitably be life-changing news, Natasha knew that if anything, God forbid, happened to Chris before she was able to, she'd never forgive herself. As soon as we started having trouble with North Korea, I became worried, she later told NBC. He was telling me goodbye. At that point, I was extremely emotional. I wanted to tell him, I wanted to freak out, said Natasha. But I kept my calm and waited, just a little longer. Finally, the last long haul passed and the six long months of Chris deployment were over. The Navy man was at long last on the voyage home to jump back into the everyday reality of being a family man. The Diaries children barely contained themselves knowing they'd soon see their father, but Natasha wasn't sure how he'd react when he realized just what she'd kept from him the whole time he was away. As Chris sailed toward the American West Coast, he had no idea that it wasn't only a few hugs that would greet upon his return. On June 23, Chris Diarty's whole family had made the journey to San Diego where his ship had docked. As he disembarked, he couldn't help but burst into the biggest cheek-to-cheek smile when he spotted his loving family waiting for him. But his wife wasn't smiling, he immediately realized something was off. Clad in many sailor outfits, Chris' two daughters and son excitedly rushed to hug and greet their uninformed father. They were so happy and Chris couldn't believe how much they've grown over the last few months he was gone. The realization that he'd lost a few months from their kids' lives struck him like a train. As the overjoyed kids jumped and swarmed their dad, Natasha held back, but Chris didn't realize why until he got closer. After the sweet reunion with his children, Chris headed over to Natasha. Suddenly smiling, she was holding a large poster welcoming her spouse back from his maritime duties. He didn't realize she was holding a huge poster in her hands and proceeded to try to hug his wife, but she backed away. They exchanged looks but not much can be said when your children can hear everything. Chris realized something was going on and Natasha knew it. It was time to tell in the truth. Natasha realized it was time to reveal her secret to her husband. After all, her family knew about it and it was only a matter of time until he would realize on his own that something was different about her. As Chris reached out to embrace her, she stepped back and dropped the sign she'd been holding.  For a few seconds, Chris was frozen in shock. How could she do this? After a few seconds of complete shock, he was able to utter, Is that real?  How could she keep this from him? Natasha greeted Chris holding a sign that read, Welcome home baby daddy. With three children between the two of them, the message made sense. But the placard was covering something underneath that Chris could never have expected. When Natasha dropped the placard, she revealed a shirt that read I am the present my daddy gave my mommy before he deployed, under which was a very pregnant belly. Crowds gathered, but there wasn't a dry eye around after what happened next. Chris couldn't believe his eyes. It was a pretty awesome confusion going on here, he said of that extraordinary moment. I was looking at her, then poked it because I was not sure if she was playing a trick on me. Was his wife pranking him? Once Chris composed himself from the initial shock, the couple finally kissed and embraced, reveling in the joy of Chris long awaited homecoming and the surprise of another child on the way. The moment was already bursting with emotion, and although it didn't seem possible, there's was something else that made the day even more special. As it turns out Chris return home just about coincided with father's day. He had dropped anchor just a few days after the annual Sunday celebration and couldn't have received a better present to mark the occasion. I have three kids already now so a fourth will just add on to the excitement and craziness, he said. The Diary family members rejoiced as the weight of months apart had lifted, and they now had a tiny miracle to look forward to. Little did they know then, however, but they'd soon become famous. Although Natasha had initially wanted to keep her pregnancy from family and friends to lower the chances that someone would accidentally give the surprise away to Chris, her growing stomach eventually became apparent, and she rallied them to maintain the happy secret. It was one of those friends who came to the Navy Homecoming and recorded a video of the touching family reunion. The video quickly became a sensation on Facebook, and now has more than half a million views. Still, no one, and particularly Chris, could have guessed just how Natasha was able to conceal her growing secret for so long.  She tried to make it seem that nothing was out of the ordinary and would inconspicuously hide her growing baby bump and photos she sent Chris while he was away. In one photo, she placed their toddler on her lap to hide her midsection. In another, she held a beer can that she obviously didn't drink in front of her. I had to tell my four-year-old I was getting fat. Otherwise, she would tell. Because she's a blabbermouth, she laughed as she explained just why she decided to make the good news a surprise. But that wasn't all. I found out about a week after he left. I didn't believe it, Natasha, then 28 told ABC News. I took the pregnancy test again, and I was like, oh no way. At that point, Natasha was about eight weeks along. She was so excited about the pregnancy and wanted to tell Chris the good news in an email. On second thought, however, she realized she'd prefer another way. I emailed him back and said, I just miss your voice. That's when I decided I'm going to document it with weekly belly pictures for him so he wouldn't miss it. But that wasn't all. Admittedly keeping that information from her husband was one of the hardest things Natasha has ever done. She also knew that if she told her navy husband, he would worry and be disappointed that he was missing out yet have no way to be there. In addition, the navy wife wanted to share all the fear and challenges that came with expecting a baby. Ultimately though, she decided the surprise would be worth it. Although Chris had missed the first 7.5 months of the pregnancy, there was still another surprise in store for the couple. While Natasha had initially kept her pregnancy a secret from her navy husband, she did decide to wait until they were together again to find out the gender of the baby. Therefore, one of the first things the family did after Chris returned home was to have a gender reveal party. With friends and family at their side, Natasha and Chris popped a bundle of balloons that revealed pink confetti. The couple was having another girl and they were over the moon. Their fourth baby was due in August, which gave them about two months for something they desperately needed. In the months after Chris returned the Diary family was able to fit some unforgettable quality time. Along with stocking up on diapers and completing some final touches to the nursery, the couple also fit in some adorable maternity shots. Chris and Natasha were able to do some much needed bonding with their three oldest kids before welcoming the fourth. The whole clan was excitedly anticipating the big day when Chris got another deployment notice. The family crossed their fingers and hoped with all they had that he wouldn't miss the birth. For those in the military, there's always a chance of getting called up at a moment's notice. However, Chris Diary hoped that wouldn't be the case when the time came for his wife to give birth to their fourth child. Luckily, it seemed that he could expect to be in the delivery room as his next deployment date was set for early 2018 and he would be able to be there for his fourth child's birth in August 2017 to enjoy the miraculous experience before he shipped out again. To the whole family's delight, Chris indeed was present when, on September 2, 2017, Natasha gave birth to their fourth child. The pair named the baby Anna Rose, who joined her 10-year old brother, for year-old sister and 18-month-old sister. We love you so much. You have completed our family of six, Chris wrote on Facebook after she was born. Can't wait to bring you home. Now that the family was settling into life with the new little addition, their true feelings about the whole whirlwind of events became more clear. In the end, both Chris and Natasha were glad that he found out the good news about the pregnancy in person. Despite the range of emotions that Natasha dealt with keeping the secret, in the end, she was happy Chris could be part of the process once he returned. She was also content knowing her husband hadn't been riddled with unsettled thoughts of not being with his family while he was away doing such focused work.  It was an awesome surprise to find out that way. Finding out an email or over the phone, that's easy, but since she saved it, it was special, Chris said toutingly. And Natasha expressed similarly heartwarming sentiments. It was difficult but totally worth it in the end, Natasha told NBC. With that successful surprise behind them, Natasha made waves when she openly spoke about whether she was planning any surprises for Chris' next military deployment. Before Seaman Chris Diarty was due to ship out again, the couple did an interview with CBS. What surprises are you going to have next time? Correspondent Jamie Yuckas asked her. In response, Natasha laughed and responded, nothing. As well as the first surprise worked out for everyone, one seemed to be just enough. Although it wasn't a surprise, the family again had to gear up when baby Anna Rose was just four months old, and it came time for Chris to deploy yet again. In early 2018, the US Navy shipped out Chris for another four-month round to the Western Pacific. This tour took him to the likes of Guam, the Philippines, and Vietnam. He and Natasha had promised that this time around there would be no surprises, but he still longed to be home. Having spent so much time away from his loved ones, Chris made a vow to put down electronics and spend more time face to face when he again returned home. About four months after it started, the tour was over. He finally headed home unsure of whether his wife would really stick to what she said about no more surprises. In April 2018, Christ Diarty was once again happy to be reunited with his family. To everyone's surprise or not, there really were no surprises, at least that we know of, at his homecoming this time around. Of course, Chris did miss his the baby along with the rest of his family. And while his homecoming might not have made as big of a splash for the rest of us, his previous one won't soon be forgotten for a good reason. Soon after going viral, the video of the Navy husband being surprised by his pregnant wife made it from social media to the mass media. Outlets across the country caught wind of the beautiful story and wrote dozens of articles about them. They were also invited to endless interviews. While the cycle of Navy deployment may not stop soon for Chris Diarty, neither will the proliferation of their happy tale. Now that the family has endless documentation of the moving pregnancy reveal moment, baby Anna Rose will no doubt get a kick looking back at it all one day.


Speaker, first is Ankush Sharma. He is an undergraduate from IIT BHU Varanasi and he has been a founder of Python since his college days. I would like you to give him a big round of applause for him. The second speaker will be Sivan Verma. He is also from IIT BHU, third year. He is also a Pythonista. His interests are image processing and network programming. So please can we have a huge round of applause for both of them. So now is the important part. You can tweet using the hashtag Python India. So just open up your laptop, start tweeting if you like something or you don't. Kill the volunteering team with your comments. Second thing, the Wi-Fi password is geeksrs. That is G-E-E-K-S alphabet R-U-S, geeksrs. So if you want you can just join the SSID would be Python India only. So that's it. For any help you can just come up to me or tensing or anybody, any of the volunteers here. So I hope you will have great session. You will enjoy it. So thank you. Hello. So shall we start? So good morning people. So this is our talk. Python the IIT of real world computer applications. So interesting title. A little bit complex too. But you will know its meaning till the end of this particular talk. So what we are going to do today is we are going to introduce you to a new way. So should I say a more cool way to make new computer applications which can be controlled by hand gestures. So about us. So I am Ankush Emma. We people are from IIT, BHU, Warnasi. ECE, Android Jours. With my colleague over here, Shivam, sitting over here. And meet my IIT friend who was part of this particular project. Abhishek here sitting over at the back. Hi Abhishek. So powering us to gesture control. This was the cool thing I was talking about earlier, gesture control.  The computer camera will capture your hand gestures from the physical world. And translate them to actions. And these actions will be executed by your computer. Means you are going to have the power to control your computer by your physical gestures in the physical world. And you will do your operations in the camera by doing these physical gestures. Sounds cool people. So you are going to need some technology for doing that. Can anybody have any guess which technology I want to use? Any guesses? Okay, image stressing. Which technology I am asking. Okay. So the talk is about image stressing and how to use it in Python. First of all, I will walk you down through the basic issues internally. The idea of image, how images are stored in computer, how computer manipulates images and all other things. Then I will walk you down through the same possible library and Python stuff. Python is a library of Python. Then at last I will provide you with certain algorithms or workflow models you can use to make your own computer vision app. Okay. So let us start. So first, a brief overview. The order in which we are going to talk today. First of all, what is image stressing? Second, image stressing with Python. Third, how to use Python. PyGAM is a library as I already said. It is a codependency of SylpaCV, the computer vision library of Python. Lastly, Siam, my colleague will walk you down through the building process of touch-to-touch mapping algorithm and virtual user game. These particular applications we have made for this particular part. So, meet our friend. Both are Python programmers. Both have all sorts of experience working with Python from the development system programming. But both are image stressing. So, as you may have seen earlier, both are image sisters who are supposed to be adjusting them for that. So, both value wants to do this. So, he is supposed to do this particular gesture control game.  Just raise up your hands. Okay. Thank you. So, what tools Bo has in his toolkit? First of all, I will say Bo is an excellent Python programmer. So, he knows Python. And most of you people also know Python. Sankini SylpaCV library, the computer vision library of Python. PyGAM game library of Python. So, we will keep our talk related to SylpaCV and the PyGAM libraries of Python. Okay. So, let's talk about first your stressing. So, basic ideas of image. So, how will people see images and most humans see images? Suppose I click a random bit like I click one now. Okay. So, I can say that picture has mountains, beautiful lakes. So, I can say it is a landscape. Means I can see things and adjust them. Similarly, I can say that these rows have more number of people than these rows. So, I can basically see pictures and adjust them. But computer sees things in a different scale. It sees things as numbers. And these numbers are what we call as light intensity values at different places in the image. And these different places are what we call as pixels of the image. So, basically, image is a group of pixels and each pixel has a light intensity value. So, you people are seeing this left color goal over here. So, there are, you can see in the left click corner, the values in the 90s are represent red color and the values in the 70 represent yellow color. These different colors are mapped to different numbers. Suppose you have a red value, it will be mapped to a number X in the computer. And suppose you have a green value, it will be mapped to a number Y in the computer. So, computer sees colors as numbers. And these numbers are what we call as the light intensity values. So, there can be different skips for representing these light intensities. You can use a 8-bit value or you can use a 24-bit value. We will talk about them later.  So, what about if you are stressing? So, suppose I have a pic of Mona Lisa, I have a program, if you are stressing program running on my computer. So, what can I ask the program? So, I can, am I ready with? So, what I can ask the program? I can ask my computer, hey, tell me the number of red pixels in the image. So, the computer will look through all the pixels in the image and check out the intensities which matches the intensity of the red ones. So, it will display the count. So, for an image, the computer will give me some information. So, I can use these information to process the image. And after that, I can use this information to take certain actions. So, I can ask the computer, hey, shut it down yourself. If the number of red pixels in the image is equal to 100. Means, you have an image, you get information from the image and do certain actions depending upon that information. This is what we call as image stressing. Not about color channels. So, there can be, there are most popular two color channels. People use RGB and HSV. RGB stands for red, green, blue and HSV stands for hue saturation value. People generally tend to use HSV over RGB because HSV takes out the effect of luminosity of light at different places. So, here comes the point. Use stressing with Python. So, Python is a powerful programming language. It has all sorts of libraries for different stuff from network programming to system programming and all sorts of stuff. So, for image stressing, Python has a good library which is simple city library, simple computer vision. So, simple computer vision as an open source framework or as I should say a library which is used to develop rapid computer vision applications. It is a high-level library. Means, you don't need to know about basic details of image stressing stuff like bit fields, metrics, manipulation techniques and other things. You can build a good computer vision app by knowing just the basics of image stressing. So, let's dive in simple city. A note, simple city is not equal to open city. Simple city is just a wrapper across open city. Open city is a multi-platform library. As you know, it's a level for all programming languages like Java, C++ and other sorts of stuff. So, also simple city adds lots of fun stuff like OCR and barcodes which can be used at different points in your application. So, simple city provides a rich set of classes dealing with different stuff like cameras, displays and all these other stuff. So, you guys are doing image processing, right? So, you need an image. So, how do you get an image? So, you can use your camera to get one or you can get an image from a URL or you can use your phone too for getting an image. So, let's talk about getting an image from a camera. So, there can be many cameras connected to your computer at a certain point. So, you need to choose a camera which you are going to use for capturing the image. So, this camera is pointed out by the camera ID or we should, we can say it as descriptor. So, first of all, I'll import the camera class from simple city. So, from simple city import camera. Now, I instantiate a camera object by passing it to zero. Zero is for my default camera. My default level comes in my laptop. So, I instantiated a camera object Now, I can ask the camera to display live field the video. Camera live function will do it. It will display the live field. In case of live field, you can get the live intensity with a particular mouse coordinates by clicking just clicking on the image. Similarly, I can get an image from my camera. I can do camera get image. It will return the image object which is an instance of image class. If you get an image instance, it will look further about the properties of this image object. Note about camera properties. You can set the camera properties, the resolution and other properties by instantiating the camera object by passing in a dictionary. But these properties are properties are highly manufacturer dependent. And these are generally poorly recommended by the manufacturer. Meaning, setting a particular property will work or may not work in a particular case. A little bit quirky but it is observed here. Now you have an image right. You need to display it to people. So, how you display it? You need a display object for displaying images to people. So, let us create a display object. So, how you create a display object? From simple series, we will import the display class. The display class is used to instantiate the display object by passing in a tuple telling our resolution. Now you have a display object. Some of you might be interesting in displaying some information on that display object or pointing out some information about the image on the display object. So, suppose I want to display the HS3 values at a particular mouse coordinate. So, I need the mouse coordinates. So, you can use the display object to get the mouse coordinates. So, you can use the attributes mouse x, mouse y of the display object. You can see that xy equal to display dot mouse x it will return the xy coordinates of the display object where the mouse is. Now, you might be interested in cropping the image or doing some operations on the image on a particular event. So, suppose I left click on the image and you want to crop it. So, you can use the display mouse left event. It will let you assign image to this particular left click event. So, let us talk about image image class in depth. So, as I said earlier simply we can deal with variety of sources of images and videos. You can have a URL for a particular image or you can use a local file from your hard disk for creating an image. Simply you can use your camera to click one now. So, suppose I use a local image, local.png for creating an image instance. So, now there can be various methods for this image object. So, you can add text to this image object by doing img.drawText or you can mark certain, suppose you have a group picture in which you want to mark some random person. So, you need, so you want to mark this person by marking a circle around him. So, you can draw this circle by using the draw layer method of this image object and then you can draw certain shapes like circle or other things like tangles etc. etc. So, this is an area that images are stored in computer in a matrix in a 2D array where each element of the array represent the light intensity at that particular pixel in the array. So, if you want to get the array, the matrix of the image, you can use img.getNumPy. It will return a NumPy array. Now, you have a NumPy array. You can do certain operations on the array. You can manipulate the image, create your own image and then save it. So, hello and simply just a simple CV hello world program. First I will run it. Just I am going to show you a video just basic simple stuff. So, what there is happening you are getting live feed from your camera and displaying some information on the image. So, first of all importing all the necessary classes, image, display color camera from the simple CV using the default camera, creating a default camera object. Now creating a display object by specifying the resolution. Now in a while, I am capturing the continuous images from the camera and adding text to that and saving them on the display. Just basic stuff. So, I am going to show you a demo, basic image manipulation techniques. First of all, I have switched to the virtual environment I have created. Is this visible? Okay. Okay. I am increasing the font. Okay. I don't have skimmed, I guess. Yes. Okay. Okay. Thank you. Is it fine? So, first of all, I import the necessary classes. It will take a little while. So, now I create an image by using a local image file. Sorry, I need to switch the directory. You are right. So, you have an image instance now. You can get the height of the image by doing just mg.height. So, just 253 pixels and you can get the width. Okay. So, suppose I want to make the image half. I can just do like that. First, I need to make the array, the NumPy array. So, I have the array now. So, I create a new array from that, which is half. Half the size of the x coordinate of the image. So, w by 2. I will take all the values. So, now I need to show the image. So, I will create the image instance from this NumPy array. So, just mg1.ro. So, this was the cropped image and I will show the original image. This is the original image. So, you can do another operation like highlight operations. Like you can binarize the image. You can see the binarized image. So, simple thing is quite powerful library for image processing. You can do certain operations on images. So, let's talk about something different.  So, let's talk about the fun part gaming. So, PyM. PyM is a beautiful gaming library of Python. PyM is a co-dependency of simple CV. Simple CV uses PyM to draw stuff on the screen as you saw. As you saw the images drawn by the simple CV library. The surfaces and other stuff. PyGames. With PyGames you can add media to your games with all formats, one image formats. It supports all sounds quite nicely. You can use your keyboard, mouse, joystick, all other hardware which you use to control your games. PyGames provides good event driven API for controlling that. So, let's talk about commands in classes. So, in case of PyGames you need to first create instances of image, display and other surface stuff before you actually write code. So, it makes a little overhead code before you actually start writing code. So, you guys should try this boilerplate code before you actually start writing code. So, you guys can do pygame.initialize it will automatically create objects for you. The display object, the image object and other objects. So, if you need to So, you guys are creating games. So, you need to display the outer window. So, how will you create an outer display window by using pygame? Just use the display object which was earlier created by this pygame.initialize So, just do display dot set caption and the title of your game it will set the caption of your display object and then you can get a surface object which is whose name is screen air and by doing just display dot set mode and passing in the resolution. So, surface objects. So, games are designed just like you have events and depending on triggering of events, events you update your UI. You will see you add an image to your game or you can shoot a ball now and do other stuff like that. So, this updating is done by surface objects. So, surface objects in case of pygame every 2D object is a surface object. From images to displays all these things are just surface objects and what is the power behind surface objects is that you can draw one surface object over another. So, you have basically our window which was created earlier in the last slide. So, now you want to add something to that you can use the properties of the surface object to add something to it. So, these are the useful properties the fill. You can fill color to your display object by passing in a RGB triplet you can get the height and width of the display object or you can bleed your display object. So, bleeding means suppose you have 2 images A and B. The size of A is 100 cross 100. The size of B is 10 cross 10. You can bleed the small image on the bigger image it is just like a matrix operation. You put the elements of the smaller matrix onto the bigger matrix and specify the source and destination place. So, basic pygame program. So, you can see these small lines of code can produce a good program like that. Just basic stuff. So, first of all just importing the size is the boilerplate code and now just loading the surface of the bowl the image pygame.image.load bowl.bmp So, we have the image and we have the screen the outer display object by pygame.disc display.setmode and now in the volume just updating the positions of the bowl and screen that fill the color and then bleed operation updating the bowl the font and just basic stuff. As I said earlier pygame provides a good event drive and update in which you can trigger events in which you can trigger events and add stuff to your program and sprites are quite awesome in case of pygames sprites are basically characters in your games and the reason behind the popularity of sprites classes is that you can use the methods of your superclass on your objects on your pygame objects and you can check that if that two objects are colliding or not colliding and just work stuff. So now my colleague Shivam will carry us from here Shivam Hello I am Shivam So, here you can see So, now after getting knowledge of all these libraries related to image processing and gaming we are moving toward its implementation part ok Hello So, we are moving toward its implementation part that is application part So, now you can see here Bob is turning this toolkit away he is going to build something new So, we together decided to build two new cooler applications that I am going to discuss here one by one Firstly, we take the touchless flat P How much you play the flat P in your android form ok So, it is as the if you remove the word touchless the flat P it is just a game I need to cross the value my movie up and down and the motion of the word is controlled by the keyboard or in mobile you touch the phone ok but here, you can see we introduce the word touchless by using image processing So, in this game we are controlling the motion of the word that is Bob is moving up and down we are the gesture we are both from the gesture of the camera and Bob is moving up and down So, we are moving to its algorithm and building process of the application I want to show the demo video So, here you can see we are performing gesture in front of the camera and Bob is moving up and down ok and the webcam of the laptop is continuously capturing images that I will discuss in the algorithm So, that's it Now, what is the building process of this application what is the algorithm behind this application it basically consists of two steps capturing the hand gesture from the physical word and finding the coordinates of the marked object ok as you can see we need to test the gesture where it is going we need to update that point in the game we need to update the board position so, we need to distinguish the gesture from the physical word for that purpose, here is the marked object marked object can be a light or a small colored cap which we can wear on finger distinguishable, what does it mean as you know, we can deal images with RGB or HSE ok, in this mode we are using RGB so, distinguishable means the RGB range of the marked object is different from the RGB range of the background that I have in here ok, that's the distinguishable means so, we are using marked object for that now, what the final is going on there what is going on there as you can see in the next slide we are using gesture in front of the camera in front of the camera and camera continuously capturing the image and parallelly transferring into the image processing program that we call a competition part what the image processing program is it continuously taking images and input and do processing on it what is it processing it tells the whole image it tells the each and every pixel checking the RGB value of each pixel when images come in the range of the marked object RGB range, then it will be converted as a marked object point which is the image we get the different RGB values of each and every pixel so, after getting all this point that is the marked object point we do some calculation and finding its center and that center will be converted as a marked object point that's related, we need to update the board coordinates ok, according to that is the output of our image processing program coordinates of the marked object that is the first part getting the coordinates of the marked object now what is the second part we need to update the board coordinates with the coordinates of the marked object now here we have a gaming application gaming part, gaming program and here we have an image processing program where we gather coordinates of the marked objects we need to interface between them so before interfacing we need to consider a certain point that is scaling what is scaling? I am using a backup of laptop having different evolution and I build a game having different scaling factors gaming application so we need to scale both of them in such a way that board can cover all gaming display because it might have a problem that you are moving hand in this way and board can only move in a small distance it will not able to cover the whole part of the game that is the whole process we are going on there so overview of all these things what is going on hand gesture from the camera camera continuously taking images and give it to the in the processing program that is computational path it gives the output that is the coordinates of the deducted color and then we update interface the program with the gaming application and the board will update according to the gesture so that is the future diving into the world I will show you some important code snippets now here this is the main program the valid page and initializing here we initialize the camera if it is necessary to take the images you can see now we have the main process as I said it can use two steps first is image processing then second is interfacing here is the main program here you can see why loop is running there continuously it continuously taking images now here you can see we use 250, 250, 250 here we assign a RGB range of a marquee object here I pre-assign that I will use white color for the gesture as a marquee object for white color you know the RGB is 255, 255, 255 here you pre-sign the RGB values but in the next application I will show you that before running the application I will choose marquee object according to my will I can choose any of the before running application but here I pre-sign the RGB range that I will use white light so here I do in processing and calculating the white coordinate we need to update the only white coordinate of the world we no need to move the one in that direction so here I calculate the white coordinate that is the corner of the marquee object and here you can see I update the bird bird.fly.a bird.fly so that is the main part and we need to design a game for gaming we as you can see in the gaming part we have some background we pipes are creating pipes are removing pipes are removing so here is the core for that creating new pipes move pipes and remove old pipes and so here I will show you the beauty of sprites what are the sprites here we can deal objects with the rectangles suppose bird taken as a rectangle and pipe is taken as another rectangle now we need to game over game is never going to continue so we need to game over when bird touches the pipe it will do light so this is the part that is the beauty of sprites we make two rectangles if the rectangles are equal then the game will go over so that is our part this is the main program so now this is the overall building process of the touchless strategy application I will go what is going on there can we move the next application so our next application is virtual user virtual user in this application we are just controlling the function of a computer mouse we are just sure here is the differences in the touchless strategy app you see that we just need to control only one function that is moving bird up and down only if there is a one function but here we need to do any function mouse rubber click, mouse finger click mouse tracing mouse scrolling filter and secondly here we don't have any gaming app where we can easily update the system properties mouse functions are controlled by the print system as you know before overcoming all these differences I want to show the demo of this application here we are using webcam having different marquee objects having yellow, red different color marquee objects in my hand and different functions are performing in the display I open a file I am moving the cursor to see the functions are performing I will tell you the whole algorithm behind it now the algorithm behind this application so as I said we have to perform various functions to overcome that we are using different marquee objects that is we are using different colors and mapping that color to different functions so it will be more clear by that here I mapped red color for cursor tracing blue for demo click and yellow for left click we are using different marquee objects that is if we have different color caps on fingers or now what is going on there here we need to update the system properties for system properties we need an api to deal with the system so we make a wrapper across actually vm32 api it runs api to deal with the system properties vm32 for windows and actually for Linux so we make a wrapper across these api and we control the system properties now who tells the system that do this this will tell our age processing program our computational part this will tell that if red color appears in the image do cursor tracing if green color appears do right click, blue pair, double click yellow pair, left click now what the computational part do that is image processing here the load comes to image processing program it will also detect do it will also detect the color single processing running on there we are performing gesture in front of the camera having different marquee objects and camera just continuously capturing image and passing it to the image processing program it will do it will need to detect the color as well compute the coordinates it will require in the case of cursor tracing and in any case we don't need to compute the coordinates so this is the whole algorithm or building process application so dive into the code here I will show you a demo how we update the mouse properties I will wrapper across xlib api and I can use that what should we do what should we do now firstly we create a mouse object so we create a mouse object now we suppose you can see a cursor is there at the corner you can see the cursor is here so let's suppose I need to move the cursor here let the coordinates 100,100 so I will call the function now initially the cursor is here and now you can see the cursor here I move the cursor similarly I can perform double click mouse mouse it will it will single click it is for the single click if I move cursor to the file it will be the single click here I can use the terminal now what is the code so I told you before that in this application we are using instant markup object detection that we can choose markup object according to our build ok so here is the code for that we run the loop for the nf times that is for the number of times we are using markup object for the number of markup objects it will take image of a markup object and calculate the RGB range of that markup object and it will be used in the further application so that is the whole building process application any question so for questions there is a mic I will give it to you so there is a mic then you can walk up to that mic so questions first thing do you have source code for this online I will open the link can you share the link no permanently clear you can go to this particular link ok ok and the other thing is do you have support for multiple markup objects from the same view have you tried that or not we have some small color caps yes two circular caps and then multiple markup objects in the same view can you use that or not in the same view you can compute anyway you can tell the computational part if yellow and red both are appearing then you can do particular function it will depend on you this color appears do this is it visible here I wrote the link so on GitHub you can go to black part so if we are using multiple markup in the same space so is there any lag upon what you show in the demo that the but is moving in y direction in the part if we are moving in x y both the directions so is there any lag between the gestures and the update of that no no as we are moving in the y direction similarly you can compute the x as coordinate and update the part according to that it will not just only the delay came in the processing part taking the image we are similarly taking the image but difference is created in the computational part you can compute the x coordinate and update according to that there is no delay is not coming according to that we just have rgba value so why not why not your program consider alpha value rgba alpha this one we are starting there rgba we can also use hsv it is more powerful it will light up the brightness effect that if we are using that color in different mode and if you take in the light rgba will totally change but hsv will continue will remain the same we can use hsv more similar to image recognition can we do voice recognition and python voice recognition i don't know so your next step would be that maybe ok can we have a round of applause for both of them both of them ok before i first of all kush and shivan before i begin so the wifi password is geeksrs that is g-e-e-k-s alphabet r and u-s so it's all in small secondly please don't create your own access points so we will have few more hint which will come up to you with an app and it will completely shout like p-p-p and they will tell you to stop your access points and do that secondly you can tweet about this using hashtag and the next talk we have is by arun ravindran and it's on jango design and he's been tinkering with jango since 2007 so i was on my ninth grade then so he's been so can we have a huge round of applause for him and more important thing there's a meeting at 3 p.m. in the rd rd3 so if you guys want to join you can yeah it's just starting up some sorry but that my laptop just hibernated okay okay actually it will be in 30 minutes


Welcome back MechanicalAI. Did you know that all basic calculations of a thermal power plant can be carried out using the steam table? This makes us wonder, what are steam tables? Before we jump in, check out the previous part of this series to learn about what the properties of steam are. Now, the properties of water are arranged in a steam table as functions of pressure and temperature. Separate tables are provided to give the properties of water in the saturation states, the liquid states, and vapor phases. All this data can be used in solving problems to find out where and how a particular condition of steam will behave at a particular state. An enthalpy-entropy chart, also known as the HS chart, or more famously the Maulier diagram, plots the total heat against entropy, describing the enthalpy of a thermodynamic system. In this case, a water-steam mixture. The bold line is a saturation line, above which all is either liquid or vapor, and below which is a liquid-vapor mixture. To the left of critical point is liquid, and to the right of it is vapor. The vertical lines are all constant pressure lines, and horizontal lines are all constant temperature lines. The lines, with negative slope below the saturation line, are dryness fraction lines. Hence, we first saw what a steam table is, then learned about the Maulier's diagram. So, like, subscribe and comment with your feedback to help us make better videos. Thanks for watching. Also, thanks a lot for those constructive comments. You helped the channel grow. So, here are the top mechanical EIs of our last videos. In the next episode of Mechanical EI, find out what Carnot and Rankine Cycles are.


Thank you, Sadi, and thanks everybody for coming. My name is Bill Hoffman, and I'm from the World Economic Forum. And what I'd like to share is just a few insights that the World Economic Forum has had in a variety of its convening events on the importance of mobile commerce as a point of leverage for creating global good. I think in general we can't underestimate the power of what the global ICT infrastructure represents at this moment in time. And so what I'd like to do is share what some of those macro inputs are and what some of the underlying ideas are. Just real quickly, I think one of the key points that is driving a lot of the dialogue right now is the nature of change, that we are living in a complex hyper-connected society that in many ways is a living thing. So the velocities have changed, the way the power is being radically redistributed, all of the feedback loops, all of the second order impacts, the ways that simply nobody can really understand what's going on is now starting to be recognized as a fundamental recognition that we need to embrace the uncertainty. And so I think what's happening in the dialogues that we're having between the private sector, the public sector, and civil society is that people are now having the courage to recognize I don't understand, help me, help me understand what's going on. So I think there's a very unique moment in time where there generally is the strength to collaborate and work together so that we can leverage this really important opportunity that from my perspective, without being too dramatic, is generally transformational. If you look back through history when electricity came online, when other big societal transformations come along, we're at that point in time and some of the decisions we make today, I think, are going to be very important for a long time to come. I think one of the lenses I think that's also important to have a structured dialogue and to come to some type of collaborative understanding is embracing this notion of some of our large paradoxes, the fact of how can you be both open and secure? How can you leverage the innovation and the collaboration and the interoperability of a lot of the open platforms with the need to be highly secure, reliable, and trusted? And that's a challenge. And there is no right or wrong answer. Likewise, looking at some of the notions around what an intellectual property asset is, how can you own and control, yet at the same time put it into a common share, allow innovation to happen on top of it? How do you strike that balance? And obviously the notion of how can we leverage the global, borderless world of the digital infrastructure, it still recognized the rights and needs of sovereign nations, of local municipalities, and finally individuals. And so all of these interconnected paradoxes are starting to create a way that there is no right or wrong, that we need to start to strike a balance in the middle. And I think this is also where we start to recognize that it's going to be a challenge before we understand what these new mechanisms look like to how we reach consensus. But more importantly, what are some of the core principles that we want to embrace, so that these new structures can work around? So the issues around anonymity, around privacy, around property rights, all of these kind of core underlying principles are from my perspective where I've seen a lot of encouragement of people starting to recognize that that is a very important set of discussions to look at right now. And clearly that relates to the e-commerce platform as well. From an infrastructure and technology perspective, and this is a buzzword, the word post-ubiquity, so by no means do I mean that we have fully connected everyone. There literally are billions more that we need to connect. But I think we're at the, if you will, the end of the beginning. And we're entering the phase now where we're all starting to deal with the data tsunami. And it's going to start to have a serious impact on our technology infrastructures, on our communications networks because there's just a deluge of data. And there's a variety of different insights you can look at that. One of the things that I've personally heard and I've connected with is just from a connectivity perspective, by 2020, in eight more years, the wireless demand is going to grow by a thousand fold. And so that the data, the insights, the numbers that we're all looking for is set to grow by a thousand. And from my limited understanding, quite frankly, the technologies to deliver on that demand aren't in place yet. So there's going to need to be a lot of innovation, a lot of ingenuity, and I think this is where the tech sector will be at its greatest in meeting that demand. But technology aside, I think one of the greater challenges are the economics that are going to fuel that innovation. And that's an issue that hasn't been addressed for over a decade, and quite frankly, it's the question of who pays. And so this is where, when you look at the overall ecosystem, that there is an asymmetry in the way that value is distributed. And this is a chronic issue that's been going on. And so when we look at all the class of new apps that are coming out, quite frankly, the economics don't close to build out this large, growing infrastructure that needs to be in place. So what do we do? Where do we look for? What are some of the answers? And so what we found out is that if you start to look at big data and if you start to look around the individual as a center of locus, that begins to start to create an opportunity space where you could create value, where you could, and this is once again a very broad statement, but there are literally trillions of dollars that potentially could be created by leveraging personal data and in one particular context around end-commerce. So the work that we've been doing is looking at all of the data that's out there buying and about and inferred about individuals, and how can greater leverage be created around that? What we've been doing is looking at a model and sense where there's greater trust, there's greater transparency and greater control that's built around the individual. And from that, you can start to unlock a whole variety of different models. Another way of saying it is if we stop looking at individuals as consumers but also producers, well then we have a whole new set of economic relationships that we can build around and create a great point of leverage. So with that, we can start the panel and look forward to the discussion. Thanks. Thank you. Thank you both.


Okay, so we have this fuzzy logic web application, it's playing this game for us, it's an ECG detection game. We have this project structure, it will be a flash application eventually. So this is the label that suggests we're doing a waveform feature detection using AI, AML. So this ECG signal has abnormalities. We could add noise to it as well. We have the waveform JS. We're trying to do everything from like math level from scratch for the waveform generation is basic math JavaScript functions. Currently we're trying to add a noise to it. So we essentially can monitor how well the fuzzy logic analysis algorithm is doing. Currently I just changed the threshold a bit. Reshould should be 3.0 something. No, 1.3, 0.3 something. Okay, it was actually in the game logic. That's why I can't find it. Right, the threshold is 0.377. So we also don't like magic numbers. Trying to get rid of any magic numbers. So with 0.365, this current algorithm is giving a perfect result. But we do not like perfect results. We like for it to do mistakes. Yeah, it's always missing. Currently, if I change, make this number a bit higher. This is the threshold for the abnormality score that the fuzzy logic algorithm spits out. So fuzzy logic algorithm looking at the raw frequency, scaling it, positive peaks. I don't know why it's raw. It should be raw. It's just positive peaks. Because originally we, yeah, for whatever reason, we were scaling them as well, but we don't need to do that. It's just the number of the positive and negative peaks. Just check. Yeah, the raw frequency is just frequency. Okay, that makes sense because then you have raw and scale. That's fine. So we have four files. We have HTML to JavaScript, the waveform JavaScript that's actually generating the waveforms that came logic. So before anyone is complaining about not being able to win the robot in detecting labeling abnormal ECG, just keep in mind that the robot is not cheating. It is just seeing the raw data. So just seeing the waveform, nothing else. It's making this decision. It's currently set on purpose to always make a mistake to miss, well, because of that threshold. Yeah, made a miss. We can quickly fix that by adjusting this threshold back to 0.365, then it will never make mistakes again. But we actually want to get rid of it. Is the abnormality membership function being used? Can we make sure we use the abnormality membership function in the back end and in the back end make a decision as to yes, no, if the signal is abnormal or not? I think we're really doing some of it, but it's not being implemented correctly throughout the code. As in we may changes to the Python code, but from memory still need to change the JavaScript. We have three levels to it, but obviously for a yes, no decision. So it's essentially yes, no, maybe. Well, but the membership function abnormality, it's mentioned 38 times. That's the main thing. Yes, we have abnormality. It's very convoluted language. It's like a double negative or something. As we're saying, it should be normal, not like normality. And if it's, if it's likely, then it's normal. Then it's, if it's unlikely, it's abnormal. And in this case, we have the measure for abnormality. So if it's likely or possible, essentially suggest that the signal, the ECG waveform is not normal. And those are the thresholds, except they would not work for the current code. Because the lowest it goes to is that magic number of 0.365. That's not cool, is it? So do you think the port can solve this for us? Yes, so we don't want to do it at the front end. We want the backend to return the abnormality score, but also essentially return the decision, make a decision, normal or abnormal. And then we calculate the score. Currently, we use the magic number threshold, which is okay, but not ideal. Especially if we're trying to use fuzzy logic correctly, we should be, everything should be in the form of this membership functions. You can go look them up. There should be a lot of content on explaining fuzzy logic, the basics of it. So to fully integrate this new system, you will want to make a decision in backend. That's what we are doing already. So in the three items that you suggested, a couple of things. Yes, we do want to make the decision in the backend, but we don't want to use a threshold, we want to use the membership function. Now the second item, yes, we want to modify, we want to send the decision as well as the abnormality score to the front end. And we want the decision, the yes, no, normal slash abnormal to be used to calculate the score. Okay, so you have all the code that we have so far. Are you going to modify the script or generate prompts for GitHub co-pilot to use? Another problem is the current membership functions for abnormality has a 0.3 threshold for abnormality to be unlikely. The fuzzy logical rhythm returns 0.31 for normal ECG waveform. And let's double check that. So it returns, okay, 0.56 what? No, it's doing 0.56 all the time. So 0.9 for this one. So it's highly abnormal. Yeah, there's something wrong. Right, 0.37 and 0.36. Yeah, 0.36. Yeah, 0.37 for this like essentially slightly abnormal. 0.37 for this one, that's okay. And 0.36049A4 normal, a waveform, fuzzy logic rhythm, no fuzzy logic algorithm. That's what I'm struggling with the transcription thing. I can never get what I say correctly unless I speak like this, but slowly, but even then a certain terminology, it gets incorrect. As late as those live streams get transcribed by YouTube using the Google API, I would imagine. I have to go and manually correct the text, which is not fun. And the decision is normal if highest membership equal unlikely else abnormal. Okay, that's fine. Okay, this is so we displaying this season on the front panel, normal or abnormal. Now, in JavaScript, we haven't gotten read off this line. And in Python code, we need to adjust the membership function so that the magic number is within the normal range. Okay, let's actually try to make something ourselves without the pot. No, we will use the pot. We want to generate this function and it should be regenerate. Okay, it's actually getting it. Let's see. And now we'll get up co-op artists and no good. What if we select the whole code when they had 201 lines of code regenerate the update fuzz score? Nope. Yeah. Didn't have the context was it for now? This does sound correct. Instead of relying on that function, we want to rely on normal abnormal. Just comment out for a sec a copied again. Now we also write in your Python app.py file. You need to treat the abnormality membership functions so that a score like 0.36043 falls under the normal category. Here's an example of how you could adjust the membership functions. Yeah, there's a problem with that is that the first abnormal, like the lowest abnormality score for abnormal is very close. The lowest score for an abnormal ECG waveform is just above this number. Which is a problem because 0.5 will be too high. So 0.5 is way too high. This might be better. There will be overlapping like the, yeah, because it's a triangular shape. We're not plotting it in one, but probably should that will require more work. Don't want it. We might later do like a general. So we'll have a new tool. It will be the ECG bot, the Kaliquest bot. I'll give it another name. If you have any better name suggestions, please do let me know. And then later we might do a more simple fuzzy logic tool. Scores up to 0.36 are considered unlikely normal. Scores just above 0.36 start entering possible category and scores from around 0.44 onwards are firmly in the likely abnormal category. This adjustment should align the fuzzy logic analysis more closely with your expectations for classifying normal and abnormal ECG waveforms. Remember, these values are just a starting point. You may need to fine tune them further based on your test results and specific requirements. Yeah, so in the beginning it's still adjusting its thresholds. So it's making mistakes. So it's going to, yeah, minus 60 score. And the human one said not to go below minus 50 might change it. It can go negative is fine. I think how the fuzzy logic score is calculated. Yeah, we need to adjust this score. So normal is still generating 0.4 now. So why? It's like getting better over time. There's some thresholds that need adjustment that are adjusting as, like as we go. Okay, so need to adjust how the score is being calculated. Score go from HTML quickly. I know it's actually in, yeah, you can select it. It's not actually text. It's being overlaid there. It's called fuzzy score. It gets based on the decision and waveform type. There's something wrong here. I expect this should be reversed. It seemed to be the fuzzy score. It's going to be going in reverse. Can you double check the code you generated? The decision abnormal and waveform type. So 0 is normal. 1 is abnormal. Yes. Okay, why the score is not going anywhere now? Score is not going anywhere. There's some silly mistake. Okay, this should stick. Okay, why? Doesn't it? My GitHub co-pilot is not working. It's not completing the code. If taking... Oops. That's why GitHub co-pilot is funny like that. Taking the decision. Yes, that was wrong. It's false alarm. It's abnormal. It's essentially saying yes to anything. Clicking on anything. Better over time. So for normal ECG, currently it gives a 0.4. What's actually later goes down to 0.36. Continuously chatting to oneself or to an i-model like GitHub co-pilot is a bit unconventional. I understand the context here is to brainstorm or debug an issue with the code. Regarding your problem where a normal ECG waveform is generating different abnormalities scores each time, there are a few areas we can look into. If the input ECG waveform data varies even slightly each time, it could lead to different fuzzy logic analysis results. Ensure that the ECG data being passed for analysis is consistent for what you define as a normal waveform. The use of global min and max values for frequency, peaks, and amplitude might introduce variability. These values are used to normalize the input data, and if they change due to new max or min values being encountered in the data, this can affect the scaled values fed into the fuzzy logic system leading to different abnormality scores. To address this, you might consider using fixed thresholds for normalization, based on the expected range of values in a standard ECG, rather than dynamically updating them. The way the membership functions are defined can significantly impact the classification. Given your example data, the scale frequency of 0.6 is classified as normal in your system, but the combination of other parameters, positive peaks, negative peaks, normalized amplitude, might be pushing the final abnormality score into the abnormal range. It might be beneficial to review and possibly adjust the membership functions or the rules in your fuzzy logic system to better align with what you expect for a normal ECG waveform. Ensure that the fuzzy logic system is stable and reduces consistent outputs for the same inputs. This can be tested by feeding the same data multiple times and checking if the output abnormality score remains consistent. Rigorous testing with a variety of ECG waveform data, both normal and abnormal, is crucial. Log the inputs and outputs to understand how the system is behaving and where it might be deviating from expected results. One approach could be to recalibrate your normalization process and review your fuzzy logic rules. Here's a pseudo code outline to guide this process. This approach focuses on reducing variability introduced by dynamic thresholds and aligning the fuzzy logic system more closely with clinical standards. Remember, fine-tuning a system like this can be iterative and may require several adjustments based on testing results.