qinxiaonan_branch 5 months ago
parent bc5c74c47f
commit 153e2baa6c

@ -10,7 +10,7 @@ GNU GENERAL PUBLIC LICENSE
The GNU General Public License is a free, copyleft license for The GNU General Public License is a free, copyleft license for
software and other kinds of works. 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, 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 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 share and change all versions of a program--to make sure it remains free

@ -10,3 +10,4 @@ nc: 2
# class names # class names
names: ['phone', 'person'] names: ['phone', 'person']

@ -19,7 +19,7 @@ import os
import shutil import shutil
from pathlib import Path from pathlib import Path
from shutil import copyfile from shutil import copyfile
import cv2 import cv2
from PIL import Image, ImageDraw from PIL import Image, ImageDraw
from xml.dom.minidom import parse from xml.dom.minidom import parse

@ -14,7 +14,7 @@ Usage:
import argparse import argparse
import os import os
import sys import sys
from pathlib import Path from pathlib import Path
import cv2 import cv2

@ -13,7 +13,7 @@ Inference:
yolov5s.pb yolov5s.pb
yolov5s.tflite yolov5s.tflite
TensorFlow.js: TensorFlow.js:
$ cd .. && git clone https://github.com/zldrobit/tfjs-yolov5-example.git && cd tfjs-yolov5-example $ cd .. && git clone https://github.com/zldrobit/tfjs-yolov5-example.git && cd tfjs-yolov5-example
$ npm install $ npm install
$ ln -s ../../yolov5/yolov5s_web_model public/yolov5s_web_model $ ln -s ../../yolov5/yolov5s_web_model public/yolov5s_web_model

@ -5,7 +5,7 @@ PyTorch Hub models https://pytorch.org/hub/ultralytics_yolov5/
Usage: Usage:
import torch import torch
model = torch.hub.load('ultralytics/yolov5', 'yolov5s') model = torch.hub.load('ultralytics/yolov5', 'yolov5s')
""" """
import torch import torch

@ -33,4 +33,4 @@ seaborn>=0.11.0
# Cython # for pycocotools https://github.com/cocodataset/cocoapi/issues/172 # Cython # for pycocotools https://github.com/cocodataset/cocoapi/issues/172
# pycocotools>=2.0 # COCO mAP # pycocotools>=2.0 # COCO mAP
# roboflow # roboflow
thop # FLOPs computation thop # FLOPs computation

@ -17,6 +17,7 @@ addopts =
--color=yes --color=yes
[flake8] [flake8]
max-line-length = 120 max-line-length = 120
exclude = .tox,*.egg,build,temp exclude = .tox,*.egg,build,temp

@ -15,7 +15,7 @@ class SiLU(nn.Module): # export-friendly version of nn.SiLU()
return x * torch.sigmoid(x) 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 @staticmethod
def forward(x): def forward(x):
# return x * F.hardsigmoid(x) # for torchscript and CoreML # return x * F.hardsigmoid(x) # for torchscript and CoreML

Loading…
Cancel
Save