Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
image_search
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
service
image_search
Commits
0b7a6f32
Commit
0b7a6f32
authored
Jun 03, 2025
by
zhengyaoqiu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
5848f290
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
.gitignore
.gitignore
+1
-0
feature_extractor.py
app/services/feature_extractor.py
+5
-1
image_upload.py
app/services/image_upload.py
+2
-1
No files found.
.gitignore
View file @
0b7a6f32
*.pth
*.pth
*.png
\ No newline at end of file
app/services/feature_extractor.py
View file @
0b7a6f32
...
@@ -112,7 +112,11 @@ class FeatureExtractor:
...
@@ -112,7 +112,11 @@ class FeatureExtractor:
if
color
:
if
color
:
mask_img
=
process_single_image
(
self
.
schp_model
,
img
)
mask_img
=
process_single_image
(
self
.
schp_model
,
img
)
img
=
extract_color_region_simple
(
img
,
mask_img
,
color
)
mask_img
.
save
(
r"D:\work\image_search\mask.png"
)
extract_img
=
extract_color_region_simple
(
img
,
mask_img
,
color
)
if
extract_img
:
img
=
extract_img
try
:
try
:
# 调整图像大小并添加填充
# 调整图像大小并添加填充
...
...
app/services/image_upload.py
View file @
0b7a6f32
...
@@ -39,7 +39,8 @@ class ImageUpload:
...
@@ -39,7 +39,8 @@ class ImageUpload:
for
image2key
in
filtered_image2keys
:
for
image2key
in
filtered_image2keys
:
image
=
image2key
[
"image"
]
image
=
image2key
[
"image"
]
key
=
image2key
[
"key"
]
key
=
image2key
[
"key"
]
vector
=
self
.
feature_extractor
.
extract_from_url
(
image
)
part
=
image2key
[
"part"
]
vector
=
self
.
feature_extractor
.
extract_from_url
(
image
,
part
)
images
.
append
(
image
)
images
.
append
(
image
)
keys
.
append
(
key
)
keys
.
append
(
key
)
vectors
.
append
(
vector
)
vectors
.
append
(
vector
)
...
...
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