Skip to content
Snippets Groups Projects
Commit 534ae497 authored by Hyunseok_Sang's avatar Hyunseok_Sang
Browse files

기타 변경

parent a5de4d73
No related branches found
No related tags found
No related merge requests found
......@@ -3,14 +3,9 @@
"brand": "beanpole",
"product_list": [
{
"name": "남녀공용 베이직 피케 티셔츠 - 블랙",
"url": "https://img.ssfshop.com/cmd/LB_750x1000/src/https://img.ssfshop.com/goods/BPBR/23/02/15/GM0023021581678_0_ORGINL_20230327140102442.jpg",
"type_of_clothes": "top"
},
{
"name": "바서티 볼드 스트라이프 럭비 티셔츠 - 블루",
"url": "https://img.ssfshop.com/cmd/LB_750x1000/src/https://img.ssfshop.com/goods/BPBR/23/01/19/GM0023011962271_0_ORGINL_20230214162711402.jpg",
"type_of_clothes": "top"
"name": "벨크로 샌들 - 브릭",
"url": "https://img.ssfshop.com/cmd/LB_750x1000/src/https://img.ssfshop.com/goods/BPBR/23/03/07/GM0023030755674_0_THNAIL_ORGINL_20230525122715725.jpg",
"type_of_clothes": "Shoe"
}
]
}
\ No newline at end of file
......@@ -11,7 +11,8 @@ class ImageDownloader:
with open(image_path, 'wb') as file:
file.write(response.content)
return os.path.normpath(os.path.abspath(image_path))
else:
print(response.status_code)
class DocumentManager:
def save_json_document(self, json_document, file_path):
abs_path = os.path.abspath(file_path)
......@@ -38,10 +39,10 @@ class JsonMaker:
"y_offset": finalImage.y_offset,
},
"face": {
"left_line_pixel": face.left + finalImage.x_offset,
"right_line_pixel": face.right + finalImage.x_offset,
"top_line_pixel": face.top + finalImage.y_offset,
"bottom_line_pixel": face.bottom + finalImage.y_offset,
"left_line_pixel": None if face.left is None else face.left + finalImage.x_offset,
"right_line_pixel": None if face.right is None else face.right + finalImage.x_offset,
"top_line_pixel": None if face.top is None else face.top + finalImage.y_offset,
"bottom_line_pixel": None if face.bottom is None else face.bottom + finalImage.y_offset,
},
"clothes": {
"type_of_clothes": clothes.type_of_clothes,
......
......@@ -6,7 +6,7 @@
var idforceNotify = stringIDToTypeID( "forceNotify" );
desc349.putBoolean( idforceNotify, true );
var idnull = charIDToTypeID( "null" );
desc349.putPath( idnull, new File( "C:\\SDP\\automated_image_processing\\back-end\\source_code\\image_data\\ssfshop\\beanpole\\남녀공용 베이직 피케 티셔츠 - 블랙\\original.jpg" ) );
desc349.putPath( idnull, new File( "C:\\SDP\\automated_image_processing\\back-end\\source_code\\image_data\\ssfshop\\beanpole\\벨크로 샌들 - 브릭\\original.jpg" ) );
var idDocI = charIDToTypeID( "DocI" );
desc349.putInteger( idDocI, 72 );
var idtemplate = stringIDToTypeID( "template" );
......@@ -71,7 +71,7 @@
var idPNGF = charIDToTypeID( "PNGF" );
desc255.putObject( idAs, idPNGF, desc256 );
var idIn = charIDToTypeID( "In " );
desc255.putPath( idIn, new File( "C:\\SDP\\automated_image_processing\\back-end\\source_code\\image_data\\ssfshop\\beanpole\\남녀공용 베이직 피케 티셔츠 - 블랙\\no_background.png" ) );
desc255.putPath( idIn, new File( "C:\\SDP\\automated_image_processing\\back-end\\source_code\\image_data\\ssfshop\\beanpole\\벨크로 샌들 - 브릭\\no_background.png" ) );
var idDocI = charIDToTypeID( "DocI" );
desc255.putInteger( idDocI, 59 );
var idLwCs = charIDToTypeID( "LwCs" );
......
......@@ -35,7 +35,4 @@ for product in shoppingmall_data["product_list"]:
image_path = imageDownloder.download_image(image_url, save_path, "original.jpg")
image = imageFactory.create_image(image_path, None, image_url)
clothesDataList = clothesDetector.localize_objects(image)
clothes = clothesDataList.getClothes(product["type_of_clothes"])
clothes.denormalizeByImageSize(image)
boxDrower.drawBox(image, (clothes.left, clothes.top), (clothes.right, clothes.bottom), "clothes")
\ No newline at end of file
no_background_image_path = photoshop_.remove_background(image_path)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment