|
@@ -58,7 +58,9 @@ class SegmentService:
|
|
|
# 哪些图片已经有抠图
|
|
# 哪些图片已经有抠图
|
|
|
for x_file in os.listdir(file_path):
|
|
for x_file in os.listdir(file_path):
|
|
|
x_file_name, x_file_e = os.path.splitext(x_file)
|
|
x_file_name, x_file_e = os.path.splitext(x_file)
|
|
|
|
|
+ print("x_file_name",x_file_name)
|
|
|
if x_file_e == ".png":
|
|
if x_file_e == ".png":
|
|
|
|
|
+ # continue
|
|
|
_is_cutout.append(x_file_name)
|
|
_is_cutout.append(x_file_name)
|
|
|
# ===============================================================
|
|
# ===============================================================
|
|
|
for file in os.listdir(root_path):
|
|
for file in os.listdir(root_path):
|
|
@@ -72,6 +74,8 @@ class SegmentService:
|
|
|
f = False
|
|
f = False
|
|
|
break
|
|
break
|
|
|
if f:
|
|
if f:
|
|
|
|
|
+ if "已扣图" in file_path:
|
|
|
|
|
+ continue
|
|
|
print("遍历文件夹", file_path)
|
|
print("遍历文件夹", file_path)
|
|
|
self.check_need_cutout_images(file_path, need_cutout_images)
|
|
self.check_need_cutout_images(file_path, need_cutout_images)
|
|
|
|
|
|
|
@@ -87,10 +91,9 @@ class SegmentService:
|
|
|
break
|
|
break
|
|
|
if not f:
|
|
if not f:
|
|
|
continue
|
|
continue
|
|
|
- need_cutout = False if file_name in _is_cutout else True
|
|
|
|
|
|
|
+ # need_cutout = False if file_name in _is_cutout else True
|
|
|
# if os.path.exists("{}/{}.png".format(root_path, file_name)):
|
|
# if os.path.exists("{}/{}.png".format(root_path, file_name)):
|
|
|
# need_cutout = False
|
|
# need_cutout = False
|
|
|
-
|
|
|
|
|
# 图片进行处理
|
|
# 图片进行处理
|
|
|
need_cutout_images.append(
|
|
need_cutout_images.append(
|
|
|
{
|
|
{
|
|
@@ -99,7 +102,7 @@ class SegmentService:
|
|
|
"file_path": file_path,
|
|
"file_path": file_path,
|
|
|
"file": file,
|
|
"file": file,
|
|
|
"root_path": root_path,
|
|
"root_path": root_path,
|
|
|
- "need_cutout": need_cutout,
|
|
|
|
|
|
|
+ "need_cutout": True,
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
return need_cutout_images
|
|
return need_cutout_images
|