diff --git a/src/image_recognition/LICENSE b/src/image_recognition/LICENSE index 92b370f..077ce41 100644 --- a/src/image_recognition/LICENSE +++ b/src/image_recognition/LICENSE @@ -10,7 +10,7 @@ GNU GENERAL PUBLIC LICENSE The GNU General Public License is a free, copyleft license for software and other kinds of works. - The licenses for most software and other practical works are designed + The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free diff --git a/src/image_recognition/data/data.yaml b/src/image_recognition/data/data.yaml index 269d23e..a00cb31 100644 --- a/src/image_recognition/data/data.yaml +++ b/src/image_recognition/data/data.yaml @@ -10,3 +10,4 @@ nc: 2 # class names names: ['phone', 'person'] + \ No newline at end of file diff --git a/src/image_recognition/data_gen.py b/src/image_recognition/data_gen.py index d81700f..735b983 100644 --- a/src/image_recognition/data_gen.py +++ b/src/image_recognition/data_gen.py @@ -19,7 +19,7 @@ import os import shutil from pathlib import Path from shutil import copyfile - + import cv2 from PIL import Image, ImageDraw from xml.dom.minidom import parse diff --git a/src/image_recognition/detect.py b/src/image_recognition/detect.py index 91251a9..f38b729 100644 --- a/src/image_recognition/detect.py +++ b/src/image_recognition/detect.py @@ -14,7 +14,7 @@ Usage: import argparse import os -import sys +import sys from pathlib import Path import cv2 diff --git a/src/image_recognition/export.py b/src/image_recognition/export.py index 4cf30e3..0ba96ab 100644 --- a/src/image_recognition/export.py +++ b/src/image_recognition/export.py @@ -13,7 +13,7 @@ Inference: yolov5s.pb yolov5s.tflite -TensorFlow.js: +TensorFlow.js: $ cd .. && git clone https://github.com/zldrobit/tfjs-yolov5-example.git && cd tfjs-yolov5-example $ npm install $ ln -s ../../yolov5/yolov5s_web_model public/yolov5s_web_model diff --git a/src/image_recognition/hubconf.py b/src/image_recognition/hubconf.py index 3488fef..3b3cc4c 100644 --- a/src/image_recognition/hubconf.py +++ b/src/image_recognition/hubconf.py @@ -5,7 +5,7 @@ PyTorch Hub models https://pytorch.org/hub/ultralytics_yolov5/ Usage: import torch model = torch.hub.load('ultralytics/yolov5', 'yolov5s') -""" +""" import torch diff --git a/src/image_recognition/requirements.txt b/src/image_recognition/requirements.txt index 9137ed8..9a88a7d 100644 --- a/src/image_recognition/requirements.txt +++ b/src/image_recognition/requirements.txt @@ -33,4 +33,4 @@ seaborn>=0.11.0 # Cython # for pycocotools https://github.com/cocodataset/cocoapi/issues/172 # pycocotools>=2.0 # COCO mAP # roboflow -thop # FLOPs computation +thop # FLOPs computation diff --git a/src/image_recognition/setup.cfg b/src/image_recognition/setup.cfg index 4ca0f0d..9f8ac92 100644 --- a/src/image_recognition/setup.cfg +++ b/src/image_recognition/setup.cfg @@ -17,6 +17,7 @@ addopts = --color=yes + [flake8] max-line-length = 120 exclude = .tox,*.egg,build,temp diff --git a/src/image_recognition/utils/activations.py b/src/image_recognition/utils/activations.py index 4c7d46c..b42e82d 100644 --- a/src/image_recognition/utils/activations.py +++ b/src/image_recognition/utils/activations.py @@ -15,7 +15,7 @@ class SiLU(nn.Module): # export-friendly version of nn.SiLU() return x * torch.sigmoid(x) -class Hardswish(nn.Module): # export-friendly version of nn.Hardswish() +class Hardswish(nn.Module): # export-friendly version of nn.Hardswish() @staticmethod def forward(x): # return x * F.hardsigmoid(x) # for torchscript and CoreML