mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
genai exception handling and lint all
Signed-off-by: vladmandic <mandic00@live.com>
This commit is contained in:
@@ -147,7 +147,7 @@ class YoloRestorer(Detailer):
|
||||
try:
|
||||
seg = (255 * seg).astype(np.uint8)
|
||||
seg = Image.fromarray(seg).resize(image.size).convert('L')
|
||||
except:
|
||||
except Exception:
|
||||
seg = None
|
||||
cls = int(cls)
|
||||
label = prediction.names[cls] if cls < len(prediction.names) else f'cls{cls}'
|
||||
|
||||
Reference in New Issue
Block a user