<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: CodeTrade India</title>
    <description>The latest articles on Forem by CodeTrade India (@codetrade_india).</description>
    <link>https://forem.com/codetrade_india</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F8635%2F8347c661-eea8-4bfd-bb98-3e19ef72aa84.jpeg</url>
      <title>Forem: CodeTrade India</title>
      <link>https://forem.com/codetrade_india</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/codetrade_india"/>
    <language>en</language>
    <item>
      <title>Effortless Object Detection In TensorFlow With Pre-Trained Models</title>
      <dc:creator>CodeTrade India Pvt. Ltd.</dc:creator>
      <pubDate>Thu, 06 Jun 2024 10:56:44 +0000</pubDate>
      <link>https://forem.com/codetrade_india/effortless-object-detection-in-tensorflow-with-pre-trained-models-214c</link>
      <guid>https://forem.com/codetrade_india/effortless-object-detection-in-tensorflow-with-pre-trained-models-214c</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8yky7ag741ss9on9601t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8yky7ag741ss9on9601t.png" alt="Effortless Object Detection In TensorFlow With Pre-Trained Models-CodeTrade" width="720" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Object detection is a crucial task in computer vision that involves identifying and locating objects within an image or a video stream. The implementation of object detection has become more accessible than ever before with advancements in &lt;a href="https://www.codetrade.io/blog/deep-learning-libraries-you-need-to-know-in-2024/"&gt;deep learning libraries&lt;/a&gt; like TensorFlow.&lt;/p&gt;

&lt;p&gt;In this blog post, we will walk through the process of performing object detection using a pre-trained model in TensorFlow, complete with code examples. Let’s start.&lt;/p&gt;

&lt;p&gt;Explore More: &lt;a href="https://www.codetrade.io/blog/train-tensorflow-object-detection-in-google-colab/"&gt;How To Train TensorFlow Object Detection In Google Colab: A Step-by-Step Guide&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Steps to Build Object Detection Using Pre-Trained Models in TensorFlow&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before diving into the code, you must set up your environment and prepare your dataset. In this example, we’ll use a pre-trained model called ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8 from TensorFlow’s model zoo, which is trained on the COCO dataset.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Data Preparation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;First, let’s organize our data into the required directory structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import os
import shutil
import glob
import xml.etree.ElementTree as ET
import pandas as pd

# Create necessary directories
os.mkdir('data')

# Unzip your dataset into the 'data' directory
# My dataset is 'Fruit_dataset.zip'
# Replace the path with your dataset's actual path
!unzip /content/drive/MyDrive/Fruit_dataset.zip -d /content/data

# Move image and annotation files to their respective folders
# Adjust paths according to your dataset structure
# This code assumes that your dataset contains both 'jpg' and 'xml' files
# and organizes them into 'annotations_train', 'images_train', 'annotations_test', and 'images_test' folders.
# You may need to adapt this structure to your dataset.
# images &amp;amp; annotations for test data
for dir_name, _, filenames in os.walk('/content/data/test_zip/test'):
    for filename in filenames:
        if filename.endswith('xml'):
            destination_path = '/content/data/test_zip/test/annotations_test'
        elif filename.endswith('jpg'):
            destination_path = '/content/data/test_zip/test/images_test'
        source_path = os.path.join(dir_name, filename)
        try:
            shutil.move(source_path, destination_path)
        except:
            pass

# images &amp;amp; annotations for training data 
for dir_name, _, filenames in os.walk('/content/data/train_zip/train'):
    for filename in filenames:
        if filename.endswith('xml'):
            destination_path = '/content/data/train_zip/train/annotations_train'
        elif filename.endswith('jpg'):
            destination_path = '/content/data/train_zip/train/images_train'
        source_path = os.path.join(dir_name, filename)
        try:
            shutil.move(source_path, destination_path)
        except:
            pass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;2. Convert XML Annotations to CSV&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To train a model, we need to convert the XML annotation files into a CSV format that TensorFlow can use. We’ll create a function for this purpose:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import glob
import xml.etree.ElementTree as ET
import pandas as pd

def xml_to_csv(path):
    classes_names = []
    xml_list = []

    for xml_file in glob.glob(path + '/*.xml'):
        tree = ET.parse(xml_file)
        root = tree.getroot()
        for member in root.findall('object'):
            classes_names.append(member[0].text)
            value = (root.find('filename').text,
                     int(root.find('size')[0].text),
                     int(root.find('size')[1].text),
                     member[0].text,
                     int(member[4][0].text),
                     int(member[4][1].text),
                     int(member[4][2].text),
                     int(member[4][3].text))
            xml_list.append(value)
    column_name = ['filename', 'width', 'height', 'class', 'xmin', 'ymin', 'xmax', 'ymax']
    xml_df = pd.DataFrame(xml_list, columns=column_name)
    classes_names = list(set(classes_names))
    classes_names.sort()
    return xml_df, classes_names

# Convert XML annotations to CSV for both training and testing data
for label_path in ['/content/data/train_zip/train/annotations_train', '/content/data/test_zip/test/annotations_test']:
    xml_df, classes = xml_to_csv(label_path)
    xml_df.to_csv(f'{label_path}.csv', index=None)
    print(Successfully converted {label_path} xml to csv.')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code outputs CSV files summarizing image annotations. Each file details the bounding boxes and corresponding class labels for all objects within an image.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Create TFRecord Files&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The next step is to convert our data into TFRecords. This format is essential for training TensorFlow object detection models efficiently. We’ll utilize the &lt;code&gt;generate_tfrecord.py&lt;/code&gt; script included in the TensorFlow Object Detection API.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Usage:  
#!python generate_tfrecord.py output.csv output.pbtxt /path/to/images output.tfrecords

# For train.record
!python generate_tfrecord.py /content/data/train_zip/train/annotations_train.csv /content/label_map.pbtxt /content/data/train_zip/train/images_train/ train.record

# For test.record
!python generate_tfrecord.py /content/data/test_zip/test/annotations_test.csv /content/label_map.pbtxt /content/data/test_zip/test/images_test/ test.record
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ensure that you have a label_map.pbtxt file containing class labels and IDs in your working directory or adjust the path accordingly.&lt;/p&gt;

&lt;p&gt;Read a complete Article Here:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://medium.com/@codetrade/effortless-object-detection-in-tensorflow-with-pre-trained-models-f20272c9d977"&gt;Effortless Object Detection In TensorFlow With Pre-Trained Models&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>objectdetection</category>
      <category>tensorflow</category>
      <category>pretrainedmodels</category>
      <category>deeplearninglibrary</category>
    </item>
    <item>
      <title>Easy Steps To Install Tutor Using Palm Release</title>
      <dc:creator>CodeTrade India Pvt. Ltd.</dc:creator>
      <pubDate>Thu, 25 Apr 2024 05:33:54 +0000</pubDate>
      <link>https://forem.com/codetrade_india/easy-steps-to-install-tutor-using-palm-release-47mi</link>
      <guid>https://forem.com/codetrade_india/easy-steps-to-install-tutor-using-palm-release-47mi</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcm9mifdsfvvkgrdzhhqv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcm9mifdsfvvkgrdzhhqv.png" alt="Tutor-Dev-installation-with-Palm-release-small" width="370" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tutor is a Docker-based Open edX distribution designed to make it easy to install, configure, and manage an &lt;strong&gt;[Open edX]&lt;/strong&gt;(&lt;a href="https://www.codetrade.io/open-edx/"&gt;https://www.codetrade.io/open-edx/&lt;/a&gt;) platform. &lt;/p&gt;

&lt;p&gt;It is used to deploy a production-ready Open edX platform, or it can be used to develop and test new features.&lt;/p&gt;

&lt;p&gt;Before proceeding with the installation process of &lt;a href="https://www.codetrade.io/blog/tutor-dev-installation-with-palm-release/"&gt;Tutor in Palm Release&lt;/a&gt;, ensure that you have the Docker v20.10.15+ CE, and&lt;br&gt;
Docker-compose v2.0.0+.&lt;/p&gt;

&lt;p&gt;Click the Link for &lt;a href="https://www.codetrade.io/blog/tutor-dev-installation-with-palm-release/"&gt;step-by-step guide for Docker Installation&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps to Install Tutor in Palm Release of Open edX Platform
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Make an edX directory
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mkdir tutor_palm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2:Go to that Directory
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cd tutor_palm/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Download and Install Tutor
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ pip install “tutor[full]==16.0.3”
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Check your tutor-installed version
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ tutor --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5: Launch your dev environment
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ tutor dev launch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it! You have successfully installed Overhang.io Tutor Palm Release and launched a development environment. You can now use Tutor to create and manage your own Open edX platform.&lt;/p&gt;

&lt;p&gt;If you are looking for a way to get started with Open edX, get in touch with the trusted &lt;a href="https://openedx.org/marketplace/codetrade/"&gt;Open edX partner&lt;/a&gt; CodeTrade. &lt;/p&gt;

&lt;p&gt;As an &lt;a href="https://www.codetrade.io/open-edx/"&gt;Open edX agency&lt;/a&gt; that offers services like consulting, support services, maintenance as well as individual developmental support for individual components of your LMS. Contact Now…!&lt;/p&gt;

</description>
      <category>openedx</category>
      <category>edxtutor</category>
      <category>palmrelease</category>
      <category>elearning</category>
    </item>
    <item>
      <title>Automatically Reindexing Your Open edX Courses with Koa Version Using MakeFile</title>
      <dc:creator>CodeTrade India Pvt. Ltd.</dc:creator>
      <pubDate>Thu, 25 Apr 2024 04:29:39 +0000</pubDate>
      <link>https://forem.com/codetrade_india/automatically-reindexing-your-open-edx-courses-with-koa-version-using-makefile-h5n</link>
      <guid>https://forem.com/codetrade_india/automatically-reindexing-your-open-edx-courses-with-koa-version-using-makefile-h5n</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9m21ka1s4j3f9x4ja5ka.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9m21ka1s4j3f9x4ja5ka.png" alt="how-to-automate-reindexing-of-Open-Edx-courses-banner" width="800" height="209"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Implement the given steps with the &lt;a href="https://www.codetrade.io/blog/how-to-reindex-all-open-edx-courses-using-make-file/"&gt;Open edX Koa version to automatically reindex open edx courses using MakeFile&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;To reindex the courses using a Makefile, you will need to include code into the file to run the command.&lt;/p&gt;

&lt;h4&gt;
  
  
  Add Code into your MakeFile to Execute Command
&lt;/h4&gt;

&lt;p&gt;MakeFile uses to build automation tools that help to organize and manage the course content. It helps to reduce the manual effort required to perform tasks, making the course development and deployment process faster and more reliable.&lt;/p&gt;

&lt;p&gt;Add the given below code into your MakeFile to execute reindex open edx command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dev.reindex.studio-courses:

 If docker inspect --format {{ json.State.Running}}’ edx.devstack-koa.master.studio; then

  docker-compose exec studio bash -c ‘source /edx/app/edxapp/edxapp_env &amp;amp;&amp;amp; cd /edx/app/edxapp/edx-platform/ &amp;amp;&amp;amp; ./manage.py cms reindex_course --all’;

 Else

  echo studio service is not started yet. To start services please run make dev.up;

 fi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd9f67s6gwmi7c950p2g2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd9f67s6gwmi7c950p2g2.png" alt="reindex-open-edx-courses-using-makefile" width="800" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can show in the example, implement the given code into your MakeFile to execute reindexing process automatically.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ make dev.reindex.studio-courses
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hit enter button to execute the command. It will automatically reindex all the open edx courses in Open edX Koa Version using MetaFile.&lt;/p&gt;

&lt;p&gt;Note:&lt;/p&gt;

&lt;p&gt;Before executing the command it is necessary to check if the studio service is started or not. In case the studio service has not been initiated yet, you can use the ‘make dev.up’ command to start the studio service. &lt;/p&gt;

&lt;p&gt;If you try to run the &lt;strong&gt;‘make dev.reindex.studio courses'&lt;/strong&gt; command without initiating the studio services, you may encounter an error message as shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;“studio service is not started yet. To start services please run make dev.up”
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;By just implementing lines of code into your MakeFile, it can easily reindex all your open edx courses without any manual intervention. And it's a very easy and reliable way to reindex your courses.&lt;/p&gt;

&lt;p&gt;If you're interested in creating Open edX courses for your organization, contact CodeTrade, an &lt;a href="https://www.codetrade.io/open-edx/"&gt;Open edX development agency&lt;/a&gt; that provides content management support and technical expertise to help you get your own learning management system up and running smoothly. &lt;/p&gt;

&lt;p&gt;Contact &lt;a href="https://openedx.org/marketplace/codetrade/"&gt;CodeTrade India Pvt Ltd&lt;/a&gt; today for more information!&lt;/p&gt;

</description>
      <category>openedx</category>
      <category>edx</category>
      <category>elearning</category>
      <category>koaversion</category>
    </item>
  </channel>
</rss>
