Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yolov5s fix bug #28

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9d87046
first commit
jiangjiajun Jul 5, 2022
7cdcb8e
Update README.md
jiangjiajun Jul 5, 2022
4c07d19
add model zoo
jiangjiajun Jul 6, 2022
ab01cf0
Merge branch 'develop' of https://github.com/PaddlePaddle/FastDeploy …
jiangjiajun Jul 6, 2022
b69f13b
Make api of yolov5 be same bettwen Python and C++
jiangjiajun Jul 6, 2022
9016ccc
Remove code that import fastdeploy directly
jiangjiajun Jul 6, 2022
3c2943b
Update CMakeLists.txt
jiangjiajun Jul 7, 2022
ba5d909
Delete ThirdPartyNotices.txt
jiangjiajun Jul 7, 2022
a4c1da4
Delete LICENSE
jiangjiajun Jul 7, 2022
2b51f0e
add support for linux aarch64
jiangjiajun Jul 8, 2022
7d13491
Align fastdeploy prediction precision with yolov5 (#11)
felixhjh Jul 8, 2022
2b742d3
fix some bugs (#12)
jiangjiajun Jul 8, 2022
2c1a4d1
Update linux_and_mac.md
jiangjiajun Jul 12, 2022
41ad7ec
Update CMakeLists.txt
jiangjiajun Jul 12, 2022
57697f3
Update setup.py
jiangjiajun Jul 12, 2022
a45f189
fixed missing trt_backend option & remove un-need data layout check i…
DefTruth Jul 12, 2022
cb5c585
Add multi-label function for yolov5
felixhjh Jul 12, 2022
5ac4976
Update README.md
felixhjh Jul 12, 2022
0ed1e84
Update CMakeLists.txt
jiangjiajun Jul 12, 2022
ec19fb1
Add multi-label function for yolov5 (#15)
felixhjh Jul 12, 2022
6c5bd8a
fix compile for python
jiangjiajun Jul 13, 2022
4c1f986
Update fastdeploy_runtime.cc
felixhjh Jul 14, 2022
6410251
Update runtime_option.md
felixhjh Jul 14, 2022
443f3a7
Merge pull request #1 from PaddlePaddle/develop
felixhjh Jul 14, 2022
5f83b3c
Fix doc and wrong variable name (#17)
felixhjh Jul 14, 2022
de7c06a
add yolov6 c++ and yolov6 pybind (#16)
DefTruth Jul 14, 2022
90061e1
Fix outputs order of tensorrt (#18)
jiangjiajun Jul 14, 2022
8918104
Add yolox c++/pybind and model_zoo demo (#21)
DefTruth Jul 19, 2022
e7c6a9d
Add model YOLOv7 support (#23)
ziqi-jin Jul 19, 2022
f670520
fix some usage problem in linux (#25)
jiangjiajun Jul 19, 2022
f8c3906
Fix compile problem in different python version (#26)
jiangjiajun Jul 19, 2022
6ae7a16
Add PaddleDetetion/PPYOLOE model support (#22)
jiangjiajun Jul 19, 2022
7594559
Fix bug when inference result boxes are empty
felixhjh Jul 19, 2022
4c88b9e
Merge pull request #2 from PaddlePaddle/develop
felixhjh Jul 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
178 changes: 178 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: true
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequires: false
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
LambdaBodyIndentation: Signature
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 0
PointerAlignment: Left
PPIndentWidth: -1
ReferenceAlignment: Pointer
ReflowComments: true
ShortNamespaceLines: 1
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: Latest
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
...

15 changes: 15 additions & 0 deletions .clang_format.hook
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -e

readonly VERSION="3.8"

version=$(clang-format -version)

if ! [[ version==∗"VERSION"* ]]; then
echo "clang-format version check failed."
echo "a version contains 'VERSION′isneeded,butget′version'"
echo "you can install the right version, and make an soft-link to '$PATH' env"
exit -1
fi

clang-format -style=google $@
60 changes: 60 additions & 0 deletions .cpplint_pre_commit.hook
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/bin/bash

#TOTAL_ERRORS=0
#echo "HAHAHAHAHHA"
#exit 5
#
#files=$(
#
#if [[ ! $TRAVIS_BRANCH ]]; then
# # install cpplint on local machine.
# if [[ ! $(which cpplint) ]]; then
# pip install cpplint
# fi
# # diff files on local machine.
# files=$(git diff --cached --name-status | awk 'Extra open brace or missing close brace2}')
#else
# # diff files between PR and latest commit on Travis CI.
# branch_ref=(gitrev−parse"TRAVIS_BRANCH")
# head_ref=$(git rev-parse HEAD)
# files=(gitdiff−−name−statusbranch_ref $head_ref | awk 'Extra open brace or missing close brace2}')
#fi
## The trick to remove deleted files: https://stackoverflow.com/a/2413151
#for file in $files; do
# echo $file
# if [[ $file =~ ^(patches/.*) ]]; then
# continue;
# else
# cpplint --filter=-readability/fn_size $file;
# TOTAL_ERRORS=(exprTOTAL_ERRORS + $?);
# fi
#done
#
#exit $TOTAL_ERRORS

if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi

# Redirect output to stderr.
exec 1>&2

cpplint=cpplint
sum=0
filters='-build/include_order,-build/namespaces,-legal/copyright,-runtime/references,-build/include_what_you_use'

# for cpp
for file in $(git diff-index --name-status $against -- | grep -E '\.[ch](pp)?$' | awk '{print $2}'); do
$cpplint --filter=$filters $file
sum=$(expr ${sum} + $?)
done

if [ ${sum} -eq 0 ]; then
exit 0
else
exit 1
fi
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
fastdeploy/libs/lib*
build
cmake-build-debug
cmake-build-release
.vscode
FastDeploy.cmake
fastdeploy/core/config.h
build-debug.sh
*dist
fastdeploy.egg-info
.setuptools-cmake-build
fastdeploy/version.py
fastdeploy/LICENSE*
fastdeploy/ThirdPartyNotices*
43 changes: 43 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
repos:
- repo: https://github.com/PaddlePaddle/mirrors-yapf.git
rev: 0d79c0c469bab64f7229c9aca2b1186ef47f0e37
hooks:
- id: yapf
files: \.py$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: a11d9314b22d8f8c7556443875b731ef05965464
hooks:
- id: check-merge-conflict
- id: check-symlinks
- id: end-of-file-fixer
- id: trailing-whitespace
- id: detect-private-key
- id: check-symlinks
- id: check-added-large-files
- repo: local

hooks:
- id: copyright_checker
name: copyright_checker
entry: python ./.copyright.hook
language: system
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|py)$
exclude: (?!.*third_party)^.*$

- repo: local
hooks:
- id: clang-format-with-version-check
name: clang-format
description: Format files with ClangFormat.
entry: bash .clang_format.hook -i
language: system
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto)$

- repo: local
hooks:
- id: cpplint-cpp-source
name: cpplint
description: Check C++ code style using cpplint.py.
entry: bash .cpplint_pre_commit.hook
language: system
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx)$
Loading