feat: completely remove IMG_20260701_134635 and IMG_20260701_134636 from dataset and update report
This commit is contained in:
1 parent
2a644cfa6d
commit
a211593f2c
4 files changed
+52
-76
No files matched your search
@@ -0,0 +1,52 @@
|
||||
import os
|
||||
import json
|
||||
|
||||
def main():
|
||||
to_delete = [
|
||||
"IMG_20260701_134635.jpg",
|
||||
"IMG_20260701_134636.jpg"
|
||||
]
|
||||
|
||||
base_dir = "backend"
|
||||
if not os.path.exists(base_dir):
|
||||
base_dir = "."
|
||||
|
||||
uploads_dir = os.path.join(base_dir, "uploads")
|
||||
public_dir = os.path.join(base_dir, "pfm-web-app/public")
|
||||
|
||||
for filename in to_delete:
|
||||
# Delete manual label json
|
||||
ml_path = os.path.join(uploads_dir, f"manual_label_{filename}.json")
|
||||
if os.path.exists(ml_path):
|
||||
os.remove(ml_path)
|
||||
print(f"Deleted: {ml_path}")
|
||||
|
||||
# Delete public image
|
||||
img_public_path = os.path.join(public_dir, "test-images", filename)
|
||||
if os.path.exists(img_public_path):
|
||||
os.remove(img_public_path)
|
||||
print(f"Deleted: {img_public_path}")
|
||||
|
||||
# Filter test_images_results.jsonl
|
||||
jsonl_path = os.path.join(uploads_dir, "test_images_results.jsonl")
|
||||
if os.path.exists(jsonl_path):
|
||||
remaining_lines = []
|
||||
with open(jsonl_path, "r", encoding="utf-8") as f:
|
||||
for line in f:
|
||||
if not line.strip():
|
||||
continue
|
||||
try:
|
||||
data = json.loads(line)
|
||||
fn = data.get("filename")
|
||||
if fn not in to_delete:
|
||||
remaining_lines.append(line)
|
||||
except Exception as e:
|
||||
print(f"Error parsing line: {e}")
|
||||
remaining_lines.append(line)
|
||||
|
||||
with open(jsonl_path, "w", encoding="utf-8") as f:
|
||||
f.writelines(remaining_lines)
|
||||
print(f"Filtered results JSONL. Remaining entries: {len(remaining_lines)}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Binary file not shown.
@@ -678,44 +678,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"filename": "IMG_20260701_134635.jpg",
|
||||
"status": "Success",
|
||||
"tilt": "7.31",
|
||||
"unwarped": "Yes",
|
||||
"metadata": {
|
||||
"noDO": "6452013068",
|
||||
"noPO": "PO/26/00002334",
|
||||
"noSO": "6451012981",
|
||||
"items": [],
|
||||
"alamat": "JL. ANCOL BARAT VIII/1 KEL. ANCOL, KEC. PADEMANGAN JAKARTA UTARA, DKI JAKARTA",
|
||||
"tanggal": "24 June 2026",
|
||||
"platTruk": "",
|
||||
"orderUntuk": "PX HEAD OFFICE ANCOL",
|
||||
"vendorInfo": "PT.PRIMAFOOD INTERNATIONAL",
|
||||
"customerInfo": "PT.PRIMAFOOD INTERNATIONAL"
|
||||
},
|
||||
"items": []
|
||||
},
|
||||
{
|
||||
"filename": "IMG_20260701_134636.jpg",
|
||||
"status": "Success",
|
||||
"tilt": "13.63",
|
||||
"unwarped": "Yes",
|
||||
"metadata": {
|
||||
"noDO": "6452013068",
|
||||
"noPO": "Not Found",
|
||||
"noSO": "6451012981",
|
||||
"items": [],
|
||||
"alamat": "JL. ANCOL BARAT VIII/1 KEL. ANCOL, KEC. PADEMANGAN JAKARTA UTARA, DKI JAKARTA",
|
||||
"tanggal": "24 June 2026",
|
||||
"platTruk": "",
|
||||
"orderUntuk": "PX HEAD OFFICE ANCOL",
|
||||
"vendorInfo": "PT.PRIMAFOOD INTERNATIONAL",
|
||||
"customerInfo": "PT.PRIMAFOOD INTERNATIONAL"
|
||||
},
|
||||
"items": []
|
||||
},
|
||||
{
|
||||
"filename": "IMG_20260701_134646~2.jpg",
|
||||
"status": "Success",
|
||||
|
||||
@@ -342,44 +342,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"filename": "IMG_20260701_134635.jpg",
|
||||
"noPO": "PO/26/0000233493",
|
||||
"noSO": "6451012981",
|
||||
"noDO": "6452013068",
|
||||
"tanggal": "24 June 2026",
|
||||
"customer": "PT. PRIMAFOOD INTERNATIONAL",
|
||||
"store": "PX HEAD OFFICE ANCOL",
|
||||
"alamat": "JL. ANCOL BARAT VIII/1 KEL. ANCOL, KEC. PADEMANGAN JAKARTA UTARA, DKI JAKARTA",
|
||||
"plat": "",
|
||||
"items": [
|
||||
{
|
||||
"kodeBarang": "220122",
|
||||
"namaBarang": "Meiji",
|
||||
"banyak": "1 CAR",
|
||||
"jumlah": "12 PC"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"filename": "IMG_20260701_134636.jpg",
|
||||
"noPO": "Not Found",
|
||||
"noSO": "6451012981",
|
||||
"noDO": "6452013068",
|
||||
"tanggal": "24 June 2026",
|
||||
"customer": "PT. PRIMAFOOD INTERNATIONAL",
|
||||
"store": "PX HEAD OFFICE ANCOL",
|
||||
"alamat": "JL. ANCOL BARAT VIII/1 KEL. ANCOL, KEC. PADEMANGAN JAKARTA UTARA, DKI JAKARTA",
|
||||
"plat": "",
|
||||
"items": [
|
||||
{
|
||||
"kodeBarang": "",
|
||||
"namaBarang": "Meiji",
|
||||
"banyak": "",
|
||||
"jumlah": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"filename": "IMG_20260701_134646~2.jpg",
|
||||
"noPO": "PO/26/0000230199",
|
||||
|
||||
Reference in new issue
Block a user