diff --git a/back-end/source_code/download.json b/back-end/source_code/download.json index 00a7f864b42a139bc13d0c45989d67475cf62a1b..914002152bb51440ec4f25d12a49fe4343c319f4 100644 --- a/back-end/source_code/download.json +++ b/back-end/source_code/download.json @@ -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 diff --git a/back-end/source_code/modules/fileManager.py b/back-end/source_code/modules/fileManager.py index 5396d2485629361be4f7d61015191b0f98773aad..6f76dcb5eccfb064a8841c80332f3f608b6d750d 100644 --- a/back-end/source_code/modules/fileManager.py +++ b/back-end/source_code/modules/fileManager.py @@ -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, diff --git a/back-end/source_code/remove_background.jsx b/back-end/source_code/remove_background.jsx index 9c30b07e54d23f8c87eeb33e424f482b4c758ecc..5a656632a30225112df08aa10e2294ca79d7e751 100644 --- a/back-end/source_code/remove_background.jsx +++ b/back-end/source_code/remove_background.jsx @@ -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" ); diff --git a/back-end/source_code/test.py b/back-end/source_code/test.py index 9c845b09d8c7a87295b77aef6b6b01ea26ebad2f..bd4b3e4afe40b0e9dbcaea512230aea18e5622b8 100644 --- a/back-end/source_code/test.py +++ b/back-end/source_code/test.py @@ -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