Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ai4os-yolov8-torch
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
Releases
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
m-team
ai
ai4os-yolov8-torch
Compare revisions
3d0a3e980fdd1ff773eb8389ec61d8db02225851 to d8071a495f393c51bd27a743d6dd1d760927d06d
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
m-team/ai/ai4os-yolov8-torch
Select target project
No results found
d8071a495f393c51bd27a743d6dd1d760927d06d
Select Git revision
Swap
Target
m-team/ai/ai4os-yolov8-torch
Select target project
m-team/ai/ai4os-yolov8-torch
valentin.kozlov/ai4os-yolov8-torch-cx
2 results
3d0a3e980fdd1ff773eb8389ec61d8db02225851
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (3)
Update README.md
· b031ae6a
Khadijeh Alibabaei
authored
1 year ago
b031ae6a
Update __init__.py
· cfacfeff
Khadijeh Alibabaei
authored
1 year ago
cfacfeff
Update utils.py
· d8071a49
Khadijeh Alibabaei
authored
1 year ago
d8071a49
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+1
-9
1 addition, 9 deletions
README.md
api/__init__.py
+12
-8
12 additions, 8 deletions
api/__init__.py
api/utils.py
+3
-0
3 additions, 0 deletions
api/utils.py
with
16 additions
and
17 deletions
README.md
View file @
d8071a49
...
...
@@ -9,18 +9,10 @@ In this repository, we have integrated a DeepaaS API into the Ultralytics YOLOv
# Install the API and the external submodule requirement
To launch the API, first, install the package, and then run DeepaaS:
```
```
bash
git clone
--depth
1 https://git.scc.kit.edu/m-team/ai/yolov8_api.git
cd
yolov8_api
pip
install
-e
.
```
To launch it, first install the package then run
[
deepaas
](
https://github.com/indigo-dc/DEEPaaS
)
:
```
bash
git clone https://git.scc.kit.edu/m-team/ai/yolov8_api
cd
yolov8_api
pip
install
-e
.
deepaas-run
--listen-ip
0.0.0.0
```
...
...
This diff is collapsed.
Click to expand it.
api/__init__.py
View file @
d8071a49
...
...
@@ -137,24 +137,28 @@ def train(**args):
config
.
DATA_PATH
,
"
raw
"
,
args
[
"
data
"
]
)
timestamp
=
datetime
.
datetime
.
now
().
strftime
(
"
%Y%m%d_%H%M%S
"
)
# should the project name
args
[
"
project
"
]
=
config
.
MODEL_NAME
# point to the model directory without root directory
args
[
"
name
"
]
=
os
.
path
.
join
(
"
models
"
,
timestamp
)
model
=
YOLO
(
args
[
"
model
"
])
if
args
[
"
weights
"
]
is
not
None
:
if
os
.
path
.
isfile
(
args
[
"
weights
"
]):
path
=
args
[
"
weights
"
]
else
:
path
=
os
.
path
.
join
(
config
.
MODELS_PATH
,
args
[
"
weights
"
]
)
model
=
YOLO
(
path
)
else
:
model
=
YOLO
(
args
[
"
model
"
])
os
.
environ
[
"
WANDB_DISABLED
"
]
=
str
(
args
[
"
disable_wandb
"
])
args
.
pop
(
"
disable_wandb
"
,
None
)
args
.
pop
(
"
task_type
"
,
None
)
utils
.
pop_keys_from_dict
(
args
,
[
"
task_type
"
,
"
disable_wandb
"
,
"
weights
"
])
model
.
train
(
**
args
)
return
{
f
'
The model was trained successfully and was saved to:
{
os
.
path
.
join
(
args
[
"
project
"
],
args
[
"
name
"
])
}
'
}
except
Exception
as
err
:
raise
HTTPException
(
reason
=
err
)
from
err
if
__name__
==
"
__main__
"
:
fields
=
schemas
.
TrainArgsSchema
().
fields
...
...
This diff is collapsed.
Click to expand it.
api/utils.py
View file @
d8071a49
...
...
@@ -219,3 +219,6 @@ class DotDict:
setattr
(
self
,
key
,
DotDict
(
value
))
else
:
setattr
(
self
,
key
,
value
)
def
pop_keys_from_dict
(
dictionary
,
keys_to_pop
):
for
key
in
keys_to_pop
:
dictionary
.
pop
(
key
,
None
)
This diff is collapsed.
Click to expand it.