Fix format
Browse files- .gitignore +1 -0
- custom_encoder.py +7 -5
.gitignore
CHANGED
@@ -1 +1,2 @@
|
|
|
|
1 |
__pycache__
|
|
|
1 |
+
.DS_Store
|
2 |
__pycache__
|
custom_encoder.py
CHANGED
@@ -3,12 +3,14 @@ from typing import Optional, Tuple, Type
|
|
3 |
|
4 |
import torch
|
5 |
import torch.nn as nn
|
6 |
-
from segment_anything.modeling import
|
7 |
-
TwoWayTransformer)
|
8 |
from segment_anything.modeling.common import LayerNorm2d
|
9 |
-
from segment_anything.modeling.image_encoder import (
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
12 |
|
13 |
|
14 |
class CustomBlock(Block):
|
|
|
3 |
|
4 |
import torch
|
5 |
import torch.nn as nn
|
6 |
+
from segment_anything.modeling import MaskDecoder, PromptEncoder, Sam, TwoWayTransformer
|
|
|
7 |
from segment_anything.modeling.common import LayerNorm2d
|
8 |
+
from segment_anything.modeling.image_encoder import (
|
9 |
+
Block,
|
10 |
+
PatchEmbed,
|
11 |
+
window_partition,
|
12 |
+
window_unpartition,
|
13 |
+
)
|
14 |
|
15 |
|
16 |
class CustomBlock(Block):
|