added command to load weights
Browse files
run.py
CHANGED
@@ -4,6 +4,8 @@ from time import sleep
|
|
4 |
import torch
|
5 |
from transformers import SegformerImageProcessor, SegformerForSemanticSegmentation
|
6 |
|
|
|
|
|
7 |
id2label = {0: 'seal', 255: 'bck'}
|
8 |
label2id = {'seal': 0, 'bck': 255}
|
9 |
model = SegformerForSemanticSegmentation.from_pretrained("nvidia/mit-b0",
|
|
|
4 |
import torch
|
5 |
from transformers import SegformerImageProcessor, SegformerForSemanticSegmentation
|
6 |
|
7 |
+
|
8 |
+
weights2load = 'segformer_ep15_loss0.00.pth'
|
9 |
id2label = {0: 'seal', 255: 'bck'}
|
10 |
label2id = {'seal': 0, 'bck': 255}
|
11 |
model = SegformerForSemanticSegmentation.from_pretrained("nvidia/mit-b0",
|