Skip to content
SirishaJotheeswaranPadmasekhar edited this page Feb 1, 2023 · 2 revisions

Welcome to the RoWell-Exploration-Robot- wiki!

Dataset

The goal is to not find bigger data but to find the right data for desired analytics. The borewell dataset from Kaggle contains real-time borewell images annotated using roboflow.ai, an open-source annotation tool used to label data in categories as, “completely safe borewells”, “open borewells”, “unsafe borewells”. It is recommended to use COCO Data format with input image size as 416x416

Documentation

Training a deep neural network require a lot of resources, however, GPU can perform multiple computations, distributing the training processes which enables our model to speed the process. It uses fewer resources without compromising on the efficient and power. All the models are trained with GPU in Google Collab Notebook. To re-train, we are in need to purchase Colab pro subscription. The latest yolo version bring a lot of traction, as its user - friendly and uses transfer learning to train on any given dataset.

Before, training yolo v5 and Yolo v7 models, the following instructions/installations needs to be setup:

  1. Data preperation - Dataset in Coco/ pascal VOC format with 416x416 as input size needs to be uploaded in drive ( See,report for data structure).
  2. Mount our google drive to colab notebook.
  3. Clone yolov5 and yolo v7 repository by simply running the following code in terminal. For Yolov5: !git clone https://github.com/ultralytics/yolov5 Enter the directory with the command: %cd yolov5

For yolov7: !git clone https://github.com/WongKinYiu/yolov7.git Enter the directory with the command: %cd yolov7

  1. Install all the required packages by running the file requirement.txt in terminal using the command: pip install -r requirements.txt

  2. Prepare data.yaml file. This file contains, the location of training data, validation data and a list of class names. For example, Train: ../drive/mydrive/yolov5/data/train Val:../drive/mydrive/yolov5/data/val class = [completly_close_safe,open_danger,unsafe_warning]

  3. Once the data.yaml file is ready, train the model Yolov5 Yolov7

  4. After training the output is saved in runs/train/exp

  5. Fine tuning technique can be applied to re-train the model with the best learning from previous training by using best.pt as weights. The result of training can be found in runs/train/exp

  6. Write a web scraping code, to download random image for testing. This is done using bing-image-downloader python library.

  7. Run detect.py file in terminal to obtain how well a the model can provide inference in real time.

  8. To train yolov3, efficientDet and ResNet algorithm using transfer learning, download weights of these model from here.

  9. Repeat the training step by changing different weights.

  10. Now, the yolov3, yolov5,yolov7, efficientDet and ResNet model is trained and confidence value at inference has been generated.

  11. Code for performance comparison has been evaluated and integration system can be found here

For system Integration, the first step is to obtain unique API key by following the steps below:

API Authentication

The general rule of thumb is to not share API Key in code or other sources. Eventhough, the API Key is provided in the source code, the API keys are re-generated to protect critical information from public.

Steps to create API key for Google Maps API :

  1. Open Google Maps Platform
  2. On the Credentials page, click Create credential → API key.
  3. API Key is successfully generated.
  4. Use the unique API Key to configure Google Maps.

Create Authentication Token (OAuth) Token for Zoho Mail API:

  1. Create a personal account on Zoho Mail
  2. Login with your credentials
  3. Fill API key registration form
  4. Click the "Generate API Key" button.
  5. Zoho mail API Key is successfully generated.

For Google map API, one of the mejour challenges was the unavailability of metadata. Therefore, fake metadata has been generated for testing purposes.

Create geotag for random images by following the steps below:

How to geotag?

  1. Upload an image / multiple images in the tool.
  2. On the top-right display, we have maps at which we can mark a possible location at which a borewell might exist.
  3. On the left-side we can see the latitude and longitude details of the image.
  4. Click on write EXIF tags.
  5. Download the Image.
  6. Right click on the image → Properties
  7. We can now see the metadata or the location of the image.

The next step is to replace the API key with the unique generated api key and run the cell to get desired output.

The same process if generated apikey for zoho mails and twilio and run the cell in the Google Collab Notebook to get desired output.

Email and messages and googlemap api integration has been sucessfully carried out.