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
  4. For Elden Ring players looking to enhance their gameplay experience, MMOexp is your go-to source for acquiring Elden Ring Runes safely and efficiently. MMOexp offers a secure platform where you can purchase Elden Ring Runes at competitive prices, ensuring you have the resources needed to upgrade your character and tackle the game’s toughest challenges. With their reliable service and prompt delivery, MMOexp makes it easy to focus on exploring the Lands Between and mastering its intricacies. Don’t let a lack of Runes hold you back—trust MMOexp to provide the support you need to elevate your Elden Ring adventure to new heights.

    ReplyDelete

Post a Comment

Popular posts from this blog

Learn the fastest way to build data apps

Another post starts with you beautiful people! I hope you have enjoyed and learned something new from my previous three posts about machine learning model deployment. In one post we have learned  How to deploy a model as FastAPI?  I n the second post, we have learned  How to deploy a deep learning model as RestAPI ? and in the third post, we have also learned  How to scale your deep learning model API?   If you are following my blog posts, you have seen how easily you have transit yourselves from aspiring to a mature data scientist. In this new post, I am going to share a new framework-  Streamlit which will help you to easily create a beautiful app with Python only. I will show here how had I used the Streamlit framework to create an app for my YOLOv3 custom model. What is Streamlit? Streamlit’s open-source app framework is the easiest way for data scientists and machine learning engineers to create beautiful, performant apps in only a few hours!...

Exploring The File Import

Another post starts with you beautiful people! Today we will explore various file import options in Python which I learned from a great learning site- DataCamp . In order to import data into Python, we should first have an idea of what files are in our working directory. We will learn step by step examples as given below- Importing entire text files- In this exercise, we'll be working with the file mobydick.txt [ download here ] It is a text file that contains the opening sentences of Moby Dick, one of the great American novels! Here you'll get experience opening a text file, printing its contents to the shell and, finally, closing it- # Open a file: file file = open('mobydick.txt', mode='r') # Print it print(file.read()) # Check whether file is closed print(file.closed) # Close file file.close() # Check whether file is closed print(file.closed) Importing text files line by line- For large files, we may not want to print all of th...

Machine Learning-Cross Validation & ROC curve

Another post starts with you beautiful people! Hope you enjoyed my previous post about improving your model performance by  confusion metrix . Today we will continue our performance improvement journey and will learn about Cross Validation (k-fold cross validation) & ROC in Machine Learning. A common practice in data science competitions is to iterate over various models to find a better performing model. However, it becomes difficult to distinguish whether this improvement in score is coming because we are capturing the relationship better or we are just over-fitting the data. To find the right answer of this question, we use cross validation technique. This method helps us to achieve more generalized relationships. What is Cross Validation? Cross Validation is a technique which involves reserving a particular sample of a data set on which we do not train the model. Later, we test the model on this sample before finalizing the model. Here are the steps involved in...