Skip to main content

My solution to HackerEarth's Identify the dance form challenge

Another post starts with you beautiful people!
Today an interesting deep learning challenge is finished in HackerEarth and I got 91.17026 mAP score in the leader board. One drawback I see in HackerEarth is due to small dataset many participants manually prepare the submission files and show 100% score in the leader board. Many aspiring data scientists see this and become nervous. Even with getting score 75+, they become demotivated and leave their experiments in between the challenge. Also the winning approach is not disclosed after the challenge. With this post I will try to motivate my all aspiring data scientists and I will share my solution so that in their next challenge they can easily get 85+ score or even 92+ score :)

Problem statement
An event management company organized an evening of Indian classical dance performances to celebrate the rich, eloquent, and elegant art of dance. After the event, the company plans to create a micro site to promote and raise awareness among people about these dance forms. However, identifying them from images is a difficult task.

You are appointed as a Machine Learning Engineer for this project. Your task is to build a deep learning model that can help the company classify these images into eight categories of Indian classical dance-

  1. Manipuri
  2. Bharatanatyam
  3. Odissi
  4. Kathakali
  5. Kathak
  6. Sattriya
  7. Kuchipudi
  8. Mohiniyattam
My Solution
Due to small size of the dataset, I decided to frame this challenge as object detection and recognition problem and used AlexeyAB/darknet/YOLOv4 to train and test the images. If you are new to this framework, please follow my below two posts to get started-
For the dataset preparation, I manually annotated the dataset in required YOLO format. The complete annotation process took 1.5 hours. The complete training of the model took 18 hours in my system. If you don't have GPU enabled system, don't worry! Follow this amazing notebook to install, build and train your custom dataset with YOLOv4 in colab-

Once the training is completed, weights files are generated inside the backup folder of the darknet root directory. The file name is yolo-obj_final.weights and it's size is around 250 mb. Now to make prediction on your all test images run the following command-
./darknet detector test data/obj.data cfg/yolo-obj.cfg backup/yolo-obj_final.weights -ext_output -dont_show -out data/dance_result.json < data/test.txt

The above command will generate a json file. This json file contains the detected object name, it's bounding box coordinates and confidence score. To prepare the final submission file I created a script json_csv_submission2.py. After submitting this submission file I got score 91.17026 in the leaderboard. I have uploaded my solutions files to the github and weight file in the kaggle since we cannot push file larger than 100 mb. You can fork or download the training files from below link-
my github repository And you can download the trained weights from this link.

In this post all required things are mentioned to solve an image related deep learning problem. Only one thing is expected from all of you is to get started. Until you practice yourself, you will not learn. I am quite sure that in your next image related challenge you will definitely going to use this object detection and recognition technique and spot a better rank. So push yourself, read my mentioned links, practice yourselves and in my next blog post I will share you another interesting learning. Till then Go chase your dreams, have an awesome day, make every second count and see you later in my next post.

Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. Good information you shared. keep posting.
    <a href="https://360digitmg.com/india/data-analytics-certification-training-course-in-delhi>data analytics course delhi</a>

    ReplyDelete
  3. well that was something i was searching for. Excellent presentation here are some tricks and best data science course available check the link below
    data science
    360digitmg

    ReplyDelete

Post a Comment

Popular posts from this blog

How to install and compile YOLO v4 with GPU enable settings in Windows 10?

Another post starts with you beautiful people! Last year I had shared a post about  installing and compiling Darknet YOLOv3   in your Windows machine and also how to detect an object using  YOLOv3 with Keras . This year on April' 2020 the fourth generation of YOLO has arrived and since then I was curious to use this as soon as possible. Due to my project (built on YOLOv3 :)) work I could not find a chance to check this latest release. Today I got some relief and successfully able to install and compile YOLOv4 in my machine. In this post I am going to share a single shot way to do the same in your Windows 10 machine. If your machine does not have GPU then you can follow my  previous post  by just replacing YOLOv3 related files with YOLOv4 files. For GPU having Windows machine, follow my steps to avoid any issue while building the Darknet repository. My machine has following configurations: Windows 10 64 bit Intel Core i7 16 GB RAM NVIDIA GeForce GTX 1660 Ti Version 445.87

How to use opencv-python with Darknet's YOLOv4?

Another post starts with you beautiful people 😊 Thank you all for messaging me your doubts about Darknet's YOLOv4. I am very happy to see in a very short amount of time my lovely aspiring data scientists have learned a state of the art object detection and recognition technique. If you are new to my blog and to computer vision then please check my following blog posts one by one- Setup Darknet's YOLOv4 Train custom dataset with YOLOv4 Create production-ready API of YOLOv4 model Create a web app for your YOLOv4 model Since now we have learned to use YOLOv4 built on Darknet's framework. In this post, I am going to share with you how can you use your trained YOLOv4 model with another awesome computer vision and machine learning software library-  OpenCV  and of course with Python 🐍. Yes, the Python wrapper of OpenCV library has just released it's latest version with support of YOLOv4 which you can install in your system using below command- pip install opencv-python --up

How to convert your YOLOv4 weights to TensorFlow 2.2.0?

Another post starts with you beautiful people! Thank you all for your overwhelming response in my last two posts about the YOLOv4. It is quite clear that my beloved aspiring data scientists are very much curious to learn state of the art computer vision technique but they were not able to achieve that due to the lack of proper guidance. Now they have learnt exact steps to use a state of the art object detection and recognition technique from my last two posts. If you are new to my blog and want to use YOLOv4 in your project then please follow below two links- How to install and compile Darknet code with GPU? How to train your custom data with YOLOv4? In my  last post we have trained our custom dataset to identify eight types of Indian classical dance forms. After the model training we have got the YOLOv4 specific weights file as 'yolo-obj_final.weights'. This YOLOv4 specific weight file cannot be used directly to either with OpenCV or with TensorFlow currently becau