Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
auto_annotation_pipeline
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vaisakh.nair
auto_annotation_pipeline
Commits
84eb3786
Commit
84eb3786
authored
Mar 28, 2023
by
vaisakh.nair
🎯
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'master'
Delete auto_annotation_pipeline.py See merge request
!1
parents
37dac06a
916fe8fa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
50 deletions
+0
-50
auto_annotation_pipeline.py
auto_annotation_pipeline.py
+0
-50
No files found.
auto_annotation_pipeline.py
deleted
100644 → 0
View file @
37dac06a
import
os
import
yaml
import
logging
from
videos_to_frames_file_rename
import
convert_video_to_frames
,
rename_files_in_folder
# Set up logging
logging
.
basicConfig
(
level
=
logging
.
INFO
,
format
=
'
%(asctime)
s -
%(name)
s -
%(levelname)
s -
%(message)
s'
)
logger
=
logging
.
getLogger
(
__name__
)
def
run_yolov7_processor
(
source
,
weights
,
imgsz
,
trace
,
target_dir
):
try
:
detect
=
YoloV7Processor
(
source
=
source
,
weights
=
weights
,
imgsz
=
imgsz
,
trace
=
trace
,
target_dir
=
target_dir
)
detect
.
detect
()
except
Exception
as
e
:
logger
.
error
(
f
"Error: {e}"
)
return
None
if
__name__
==
'__main__'
:
# Load configuration from YAML file
with
open
(
'config.yaml'
,
'r'
)
as
f
:
config
=
yaml
.
safe_load
(
f
)
# Extract parameters from configuration
video_path
=
config
[
'video_path'
]
frame_skip
=
config
[
'frame_skip'
]
output_path
=
config
.
get
(
'output_path'
)
string_to_add
=
config
[
'string_to_add'
]
source
=
config
[
'source'
]
weights
=
config
[
'weights'
]
imgsz
=
config
[
'imgsz'
]
trace
=
config
[
'trace'
]
target_dir
=
config
[
'target_dir'
]
# Convert video to frames
logger
.
info
(
"Converting to frames..."
)
output_directory
=
convert_video_to_frames
(
video_path
,
frame_skip
,
output_path
)
logging
.
info
(
"Videos to frames conversion complete!"
)
if
output_directory
:
# Rename files in output directory
logger
.
info
(
"Renaming Files..."
)
rename_files_in_folder
(
output_directory
,
string_to_add
)
logging
.
info
(
"Files renaming complete!"
)
# Run YoloV7Processor
logger
.
info
(
"Running YoloV7Processor..."
)
run_yolov7_processor
(
source
=
source
,
weights
=
weights
,
imgsz
=
imgsz
,
trace
=
trace
,
target_dir
=
target_dir
)
logger
.
info
(
"YoloV7Processor finished."
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment