Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RAVEN2YOLO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stephane Chavin
RAVEN2YOLO
Commits
76e3aea3
Commit
76e3aea3
authored
4 months ago
by
Stephane Chavin
Browse files
Options
Downloads
Patches
Plain Diff
name option improve
parent
4d5ff325
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
yolov5/detect.py
+6
-4
6 additions, 4 deletions
yolov5/detect.py
yolov5/train.py
+5
-2
5 additions, 2 deletions
yolov5/train.py
yolov5/val.py
+1
-1
1 addition, 1 deletion
yolov5/val.py
with
12 additions
and
7 deletions
yolov5/detect.py
+
6
−
4
View file @
76e3aea3
...
...
@@ -81,7 +81,7 @@ def run(
visualize
=
False
,
# visualize features
update
=
False
,
# update all models
project
=
ROOT
/
'
runs/detect
'
,
# save results to project/name
name
=
'
exp
'
,
# save results to project/name
name
=
None
,
# save results to project/name
exist_ok
=
False
,
# existing project/name ok, do not increment
line_thickness
=
3
,
# bounding box thickness (pixels)
hide_labels
=
False
,
# hide labels
...
...
@@ -98,8 +98,10 @@ def run(
screenshot
=
source
.
lower
().
startswith
(
'
screen
'
)
if
is_url
and
is_file
:
source
=
check_file
(
source
)
# download
if
not
args
.
name
:
project_name
=
input
(
'
Please enter the name of your project :
'
)
else
:
project_name
=
args
.
name
date_now
=
date
.
today
().
strftime
(
"
%Y%m%d
"
)
if
sound
:
...
...
@@ -268,7 +270,7 @@ def parse_opt():
parser
.
add_argument
(
'
--visualize
'
,
action
=
'
store_true
'
,
help
=
'
visualize features
'
)
parser
.
add_argument
(
'
--update
'
,
action
=
'
store_true
'
,
help
=
'
update all models
'
)
parser
.
add_argument
(
'
--project
'
,
default
=
ROOT
/
'
runs/detect
'
,
help
=
'
save results to project/name
'
)
parser
.
add_argument
(
'
--name
'
,
default
=
'
exp
'
,
help
=
'
save results to project/name
'
)
parser
.
add_argument
(
'
--name
'
,
default
=
None
,
help
=
'
save results to project/name
'
)
parser
.
add_argument
(
'
--exist-ok
'
,
action
=
'
store_true
'
,
help
=
'
existing project/name ok, do not increment
'
)
parser
.
add_argument
(
'
--line-thickness
'
,
default
=
3
,
type
=
int
,
help
=
'
bounding box thickness (pixels)
'
)
parser
.
add_argument
(
'
--hide-labels
'
,
default
=
False
,
action
=
'
store_true
'
,
help
=
'
hide labels
'
)
...
...
This diff is collapsed.
Click to expand it.
yolov5/train.py
+
5
−
2
View file @
76e3aea3
...
...
@@ -459,7 +459,7 @@ def parse_opt(known=False):
parser
.
add_argument
(
'
--sync-bn
'
,
action
=
'
store_true
'
,
help
=
'
use SyncBatchNorm, only available in DDP mode
'
)
parser
.
add_argument
(
'
--workers
'
,
type
=
int
,
default
=
8
,
help
=
'
max dataloader workers (per RANK in DDP mode)
'
)
parser
.
add_argument
(
'
--project
'
,
default
=
ROOT
/
'
runs/train
'
,
help
=
'
save to project/name
'
)
parser
.
add_argument
(
'
--name
'
,
default
=
'
exp
'
,
help
=
'
save to project/name
'
)
parser
.
add_argument
(
'
--name
'
,
default
=
None
,
help
=
'
save to project/name
'
)
parser
.
add_argument
(
'
--exist-ok
'
,
action
=
'
store_true
'
,
help
=
'
existing project/name ok, do not increment
'
)
parser
.
add_argument
(
'
--quad
'
,
action
=
'
store_true
'
,
help
=
'
quad dataloader
'
)
parser
.
add_argument
(
'
--cos-lr
'
,
action
=
'
store_true
'
,
help
=
'
cosine LR scheduler
'
)
...
...
@@ -512,7 +512,10 @@ def main(opt, callbacks=Callbacks()):
opt
.
exist_ok
,
opt
.
resume
=
opt
.
resume
,
False
# pass resume to exist_ok and disable resume
if
opt
.
name
==
'
cfg
'
:
opt
.
name
=
Path
(
opt
.
cfg
).
stem
# use model.yaml as name
if
not
args
.
name
:
project_name
=
input
(
'
Please enter the name of your project :
'
)
else
:
project_name
=
args
.
name
date_now
=
date
.
today
().
strftime
(
"
%Y%m%d
"
)
folder_name
=
'
_
'
.
join
([
project_name
,
date_now
,
opt
.
weights
[
-
4
:
-
3
],
str
(
opt
.
imgsz
),
opt
.
optimizer
,
opt
.
rf
,
opt
.
duration
,
'
YOLOV5
'
,])
print
(
f
'
Your train results will be saved in
{
folder_name
}
'
)
...
...
This diff is collapsed.
Click to expand it.
yolov5/val.py
+
1
−
1
View file @
76e3aea3
...
...
@@ -359,7 +359,7 @@ def parse_opt():
parser
.
add_argument
(
'
--save-conf
'
,
action
=
'
store_true
'
,
help
=
'
save confidences in --save-txt labels
'
)
parser
.
add_argument
(
'
--save-json
'
,
action
=
'
store_true
'
,
help
=
'
save a COCO-JSON results file
'
)
parser
.
add_argument
(
'
--project
'
,
default
=
ROOT
/
'
runs/val
'
,
help
=
'
save to project/name
'
)
parser
.
add_argument
(
'
--name
'
,
default
=
'
exp
'
,
help
=
'
save to project/name
'
)
parser
.
add_argument
(
'
--name
'
,
default
=
None
,
help
=
'
save to project/name
'
)
parser
.
add_argument
(
'
--exist-ok
'
,
action
=
'
store_true
'
,
help
=
'
existing project/name ok, do not increment
'
)
parser
.
add_argument
(
'
--half
'
,
action
=
'
store_true
'
,
help
=
'
use FP16 half-precision inference
'
)
parser
.
add_argument
(
'
--dnn
'
,
action
=
'
store_true
'
,
help
=
'
use OpenCV DNN for ONNX inference
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment