CoolFace
Apppublic

pcb-defect-detector-project/Finql-Project

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
config.py76 linesDownload Raw Back to core
1# core/config.py2 3# أسماء الفئات4CLASS_NAMES_EN = {5    0: "missing_hole",6    1: "mouse_bite",7    2: "open_circuit",8    3: "short_circuit",9    4: "spur",10    5: "spurious_copper"11}12 13CLASS_NAMES_AR = {14    "missing_hole": "ثقب مفقود",15    "mouse_bite": "عضّة فأر",16    "open_circuit": "دارة مفتوحة",17    "short_circuit": "دارة قصيرة",18    "spur": "نتوء نحاسي",19    "spurious_copper": "نحاس زائد"20}21 22# خطورة العيوب23DEFECT_SEVERITY = {24    "short_circuit": {25        "score": 9.5, "level": "critical", "color": "#ef4444", "icon": "🔴",26        "description_ar": "دارة قصيرة - تسبب تداخلاً كاملاً في الإشارة وقد تؤدي إلى تلف المكونات"27    },28    "open_circuit": {29        "score": 8.5, "level": "critical", "color": "#f97316", "icon": "🟠",30        "description_ar": "دارة مفتوحة - انقطاع كامل للإشارة، تؤدي إلى فشل الدائرة"31    },32    "missing_hole": {33        "score": 7.5, "level": "high", "color": "#f59e0b", "icon": "🟡",34        "description_ar": "ثقب مفقود - انقطاع محتمل للإشارة، يحتاج إعادة تصنيع"35    },36    "spur": {37        "score": 6.0, "level": "medium", "color": "#8b5cf6", "icon": "🟣",38        "description_ar": "نتوء نحاسي - يغير المعاوقة المميزة، قد يسبب انعكاسات"39    },40    "spurious_copper": {41        "score": 5.0, "level": "medium", "color": "#ec4899", "icon": "🩷",42        "description_ar": "نحاس زائد - يزيد الضوضاء والسعة الطفيلية"43    },44    "mouse_bite": {45        "score": 4.0, "level": "low", "color": "#10b981", "icon": "🟢",46        "description_ar": "عضّة فأر - يضعف المسار ميكانيكياً، يزيد المقاومة"47    }48}49 50# التوصيات51RECOMMENDATIONS = {52    "short_circuit": {53        "ar": "🔴 يوصى بفحص عملية الطباعة الكيميائية وإزالة النحاس الزائد.",54        "action": "inspect_etching", "priority": "immediate"55    },56    "open_circuit": {57        "ar": "🟠 تحقق من عملية الحفر وجودة الركيزة. قد تحتاج إلى إعادة التصنيع.",58        "action": "rework", "priority": "immediate"59    },60    "missing_hole": {61        "ar": "🟡 افحص آلة الحفر وتأكد من عدم انسدادها. راجع برنامج التصنيع.",62        "action": "machine_calibration", "priority": "high"63    },64    "spur": {65        "ar": "🟣 اضبط زمن الحفر الكيميائي. قد يكون هناك تلوث في المحلول.",66        "action": "chemical_adjustment", "priority": "medium"67    },68    "spurious_copper": {69        "ar": "🩷 نظف محلول التطوير وتحقق من جودة الفيلم الضوئي.",70        "action": "cleaning", "priority": "medium"71    },72    "mouse_bite": {73        "ar": "🟢 افحص أداة الحفر واستبدلها إذا لزم الأمر. راقب سرعة الحفر.",74        "action": "tool_maintenance", "priority": "low"75    }76}