We all agree that manufacturers have a right to ensure that fake goods are not marketed in their names and that their own goods are not marketed under fake names
- In today’s world, how do you know if you are buying a genuine product?
- We plan to implement a model which will enable the user to find if a product is original or counterfeit by just inputting the logo of the brand.
- YOLOv3 executed faster than both Faster R-CNN and SSD.
- With YOLOv3 The results are also cleaner with little to no overlapping boxes.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Python (preferably latest version)
- Code Editor (Eg: Visual Studio/Pycharm)
A step by step series of examples that tell you how to get a development env running
Either you can download the zip file or clone the repository using following link
$ git clone https://github.com/anjiii-18/HackOn_With_Amazon-Aquite.git
Install pip by using below command in terminal
Linux:
$ apt install python3-pip #python 3
Install all the requirements mentions in the requirements.txt file by running
$ pip install -r requirements.txt
- Create yolov3 and training folders in your google drive
- Mount drive, link your folder, and navigate to the yolov3 folder.
- Clone the Darknet git repository https://github.com/AlexeyAB/darknet
- Create & upload the following files for training to your drive-
- obj.zip [zip of the training/validation images and their annotation files in yolo format]
- yolov3.clg [contains the configuration of yolov3 model]
- obj.name [contains the names of the class labels]
- obj.data [contains the number of classes and the locations of train, test, names and backup]
- process.py [Create and/or truncate train.txt & test.txt and then populates them, also contains the percentage of images to be used for the test (validation) set, we have kept 10% dataset as our test set]
- Make changes in the Makefile to enable OPENCV and GPU.
- Run make command to build darknet.
- Copy the files “obj.zip”, “yolov3.cfg”, “obj.data”, “obj.names”, and “process.py” from the yolov3 folder to the darknet directory.
- Run the process.py python script to create the train.txt & test.txt files.
- Download the pre-trained YOLOv3 weights
- Train the detector
- Check performance (maP, precision, recall and F-score)
- Name the weight file as "yolov3" and upload it in the cloned directory or you can download our trained weights file from the link.
Note: "yolov3.weights" file must be present inside "HackOn_With_Amazon-Aquite" folder like:
You need to install opencv in your system which can be done using following command:
$ pip3 install opencv-python
- Now, run app.py file using following command in terminal
$ python3 app.py #python3
Now you can upload any image of a Nike and Adidas product and check for its originality just in a click!
- These are the desired output images which our model is detecting for a give input images.
That's how we can upload any brand logo and get the originality.
- This is highly important issue which needs technical solutions like these to tackle.
- We can train our model with a large dataset and high capacity GPU to expand it to various other brands and can defeat the counterfeit products in the market !!