Computer Vision News - August 2022

8 CNN+LSTM Neural Networks Hello again! I hope that this month you’ll be back for our amazing tutorial. I decided, after getting a fewquestions about video and CNNs and deep learning, to create a tutorial and modify using GitHub data resources, for detection Play with the code, use new videos to train the network and send any questions you may have! Enjoy the article and coding  Introduction There aremany instances where onemay want to detect roughness in a video. A TV channel may be interested in that to protect its viewers, or for events happening in a public space. All systems today require human intervention and inspection to identify such cases. Using large datasets and deep learning we can train models which can automatically monitor and identify such videos with techniques such as object detection, tracking, action recognition, and legend generation. Flowchart The method consists of extracting a set of frames belonging to the video, sending them to a pretrained network called VGG16, obtaining the output of one of its final layers and from these outputs training another network architecture with a type of special neurons called LSTM. These neurons have memory and are able to analyze the temporal information of the video, if, at any time they detect violence, it will be classified as a violent video. Helper Functions We will use the function print_progress to print the number of videos processed and download_data to download the datasets Load Data Firstly, we define the directory to place the video dataset in_dir = "data" We set the url to download the dataset url_hockey = "http://visilab.etsii.uclm.es/personas/oscar/FightDetection/HockeyFights.zip" to download the dataset and decompress it: download_data(in_dir,url_hockey) Copy some of the data dimensions for convenience. # Frame size img_size = 224 img_size_touple = (img_size, img_size) # Number of channels (RGB) num_channels = 3 # Flat frame size DETECT GRAPHIC INTENSITY AND POWER IN VIDEOS USING CNN + LSTM NEURAL NETWORK

RkJQdWJsaXNoZXIy NTc3NzU=