Skip to content

brony28/Cartoon-Net-Detection

Repository files navigation

Cartoon-Net-Detection

Cartoon Detection using Faster R-CNN

Steps:

Setup:

Create a folder named Preparation.
Keep the following things inside the Preparartion folder:

  1. a folder named images
  2. faster_rcnn_inception_v2_pets.config
  3. generate_tfrecord.py
  4. labelmap.pbtxt
  5. train.py

The images folder will have 2 folders:

  1. test
  2. train

The train folder will have all the annotated training images and its corresponding xml file. The test folder will have all the annotated testing images and its corresponding xml file. The testing images should be less than training images. In this project, only 7 images were used for testing dataset.

labelmap.pbtxt will store the classes that is used in detection. In this project, 5 classes are used.

Next, in the generate_tfrecord.py file, update the function class_text_to_int() with the class names used in the project.

In faster_rcnn_inception_v2_pets.config file, update the number of classes num_classes: with your classes count. And number of examples num_examples: with the count of number of test images you included.

No need to edit the train.py

Now zip the Preparation Folder and upload the zipped file on the Google Drive.(Preferably inside a folder.)
Upload the jupyter notebook files as well on the drive.

Training the model

Open the notebook, Part 1: Training Model using faster_rcnn.ipynb and run every cell.

Testing the model

Open the notebook, Part 2: Cartoon Detection.ipynb and run every cell.

TF to TFLite Conversion

Open the notebook, Part 3: TF to TFLite.ipynb and run every cell.

Output:

picture alt

Releases

No releases published

Packages

No packages published