Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
automated_image_processing
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hyunseok_Sang
automated_image_processing
Commits
863200a5
Commit
863200a5
authored
2 years ago
by
Hyunseok_Sang
Browse files
Options
Downloads
Patches
Plain Diff
이미지 처리, 객체 탐지 관련 컨트롤러 추가
parent
3eec95d2
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
back-end2/src/controllers/image_controller.py
+1
-1
1 addition, 1 deletion
back-end2/src/controllers/image_controller.py
back-end2/src/controllers/object_controller.py
+15
-0
15 additions, 0 deletions
back-end2/src/controllers/object_controller.py
with
16 additions
and
1 deletion
back-end2/src/controllers/image_controller.py
+
1
−
1
View file @
863200a5
...
@@ -14,4 +14,4 @@ def process_image():
...
@@ -14,4 +14,4 @@ def process_image():
removed_border_pixel
=
int
(
request
.
args
.
get
(
'
removed_border_pixel
'
,
2
))
removed_border_pixel
=
int
(
request
.
args
.
get
(
'
removed_border_pixel
'
,
2
))
image_bytes
=
request
.
files
[
'
image_data
'
].
read
()
image_bytes
=
request
.
files
[
'
image_data
'
].
read
()
np_image
=
ImageConverter
().
convert_to_np_image
(
image_bytes
)
np_image
=
ImageConverter
().
convert_to_np_image
(
image_bytes
)
processed_np_image
=
ImageProcessingService
().
process
(
np_image
,
ratio
,
recover_size
,
chop_image
,
outpainting_size
,
removed_border_pixel
)
processed_np_image
,
x_offset
,
y_offset
=
ImageProcessingService
().
process
(
np_image
,
ratio
,
recover_size
,
chop_image
,
outpainting_size
,
removed_border_pixel
)
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
back-end2/src/controllers/object_controller.py
0 → 100644
+
15
−
0
View file @
863200a5
from
flask
import
Blueprint
,
request
,
jsonify
from
services.object_detection_service
import
ObjectDetectionService
object_controller
=
Blueprint
(
'
object
'
,
__name__
)
@object_controller.route
(
'
/detectObjectLocation
'
,
methods
=
[
'
POST
'
])
def
detect_object_location
():
if
'
image_data
'
not
in
request
.
files
:
return
jsonify
({
'
error
'
:
'
no image
'
}),
400
image_bytes
=
request
.
files
[
'
image_data
'
].
read
()
object_data_list
=
ObjectDetectionService
().
detect_objects
(
image_bytes
)
return
jsonify
(
object_data_list
)
\ No newline at end of file
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