Spaces:
Sleeping
Sleeping
Commit
·
8a818ce
1
Parent(s):
ae47333
将githun中的内容迁移到huggingface
Browse files- app.py +7 -6
- logs/train/runs/{hrcwhu_dual_branch → hrcwhu_dbnet}/2024-08-03_18-40-06/checkpoints/epoch_009.ckpt +0 -0
- logs/train/runs/{hrcwhu_dual_branch → hrcwhu_dbnet}/2024-08-03_18-40-06/checkpoints/last.ckpt +0 -0
- src/__pycache__/__init__.cpython-310.pyc +0 -0
- src/data/__pycache__/__init__.cpython-310.pyc +0 -0
- src/data/__pycache__/hrcwhu_datamodule.cpython-310.pyc +0 -0
- src/data/components/__pycache__/__init__.cpython-310.pyc +0 -0
- src/data/components/__pycache__/hrcwhu.cpython-310.pyc +0 -0
- src/models/__pycache__/__init__.cpython-310.pyc +0 -0
- src/models/__pycache__/base_module.cpython-310.pyc +0 -0
- src/models/components/__pycache__/__init__.cpython-310.pyc +0 -0
- src/models/components/__pycache__/cdnetv1.cpython-310.pyc +0 -0
- src/models/components/__pycache__/dual_branch.cpython-310.pyc +0 -0
- src/models/components/__pycache__/hrcloud.cpython-310.pyc +0 -0
- src/models/components/__pycache__/mcdnet.cpython-310.pyc +0 -0
- src/models/components/__pycache__/scnn.cpython-310.pyc +0 -0
- src/models/components/__pycache__/unet.cpython-310.pyc +0 -0
- src/utils/__pycache__/__init__.cpython-310.pyc +0 -0
- src/utils/__pycache__/instantiators.cpython-310.pyc +0 -0
- src/utils/__pycache__/logging_utils.cpython-310.pyc +0 -0
- src/utils/__pycache__/pylogger.cpython-310.pyc +0 -0
- src/utils/__pycache__/rich_utils.cpython-310.pyc +0 -0
- src/utils/__pycache__/utils.cpython-310.pyc +0 -0
app.py
CHANGED
@@ -6,13 +6,14 @@
|
|
6 |
# @Software: PyCharm
|
7 |
|
8 |
from glob import glob
|
|
|
|
|
9 |
import gradio as gr
|
10 |
-
import torch
|
11 |
import numpy as np
|
12 |
-
import
|
13 |
from PIL import Image
|
14 |
-
import albumentations as albu
|
15 |
from albumentations.pytorch.transforms import ToTensorV2
|
|
|
16 |
from src.models.components.cdnetv1 import CDnetV1
|
17 |
from src.models.components.cdnetv2 import CDnetV2
|
18 |
from src.models.components.dual_branch import Dual_Branch
|
@@ -30,7 +31,7 @@ class Application:
|
|
30 |
"hrcloud": HRcloudNet(num_classes=2).to(self.device),
|
31 |
"mcdnet": MCDNet(in_channels=3, num_classes=2).to(self.device),
|
32 |
"scnn": SCNNNet(num_classes=2).to(self.device),
|
33 |
-
"
|
34 |
self.device
|
35 |
),
|
36 |
}
|
@@ -116,14 +117,14 @@ class Application:
|
|
116 |
[
|
117 |
gr.Image(sources=["clipboard", "upload"], type="pil"),
|
118 |
gr.Radio(
|
119 |
-
["cdnetv1", "cdnetv2", "hrcloud", "mcdnet", "scnn", "
|
120 |
label="model_name",
|
121 |
info="选择使用的模型",
|
122 |
),
|
123 |
],
|
124 |
[gr.Image(), gr.Textbox(label="提示信息")],
|
125 |
examples=[
|
126 |
-
["examples_png/barren_11.png", "
|
127 |
["examples_png/snow_10.png", "scnn"],
|
128 |
["examples_png/vegetation_21.png", "cdnetv2"],
|
129 |
["examples_png/water_22.png", "hrcloud"],
|
|
|
6 |
# @Software: PyCharm
|
7 |
|
8 |
from glob import glob
|
9 |
+
|
10 |
+
import albumentations as albu
|
11 |
import gradio as gr
|
|
|
12 |
import numpy as np
|
13 |
+
import torch
|
14 |
from PIL import Image
|
|
|
15 |
from albumentations.pytorch.transforms import ToTensorV2
|
16 |
+
|
17 |
from src.models.components.cdnetv1 import CDnetV1
|
18 |
from src.models.components.cdnetv2 import CDnetV2
|
19 |
from src.models.components.dual_branch import Dual_Branch
|
|
|
31 |
"hrcloud": HRcloudNet(num_classes=2).to(self.device),
|
32 |
"mcdnet": MCDNet(in_channels=3, num_classes=2).to(self.device),
|
33 |
"scnn": SCNNNet(num_classes=2).to(self.device),
|
34 |
+
"dbnet": Dual_Branch(img_size=256, in_channels=3, num_classes=2).to(
|
35 |
self.device
|
36 |
),
|
37 |
}
|
|
|
117 |
[
|
118 |
gr.Image(sources=["clipboard", "upload"], type="pil"),
|
119 |
gr.Radio(
|
120 |
+
["cdnetv1", "cdnetv2", "hrcloud", "mcdnet", "scnn", "dbnet"],
|
121 |
label="model_name",
|
122 |
info="选择使用的模型",
|
123 |
),
|
124 |
],
|
125 |
[gr.Image(), gr.Textbox(label="提示信息")],
|
126 |
examples=[
|
127 |
+
["examples_png/barren_11.png", "dbnet"],
|
128 |
["examples_png/snow_10.png", "scnn"],
|
129 |
["examples_png/vegetation_21.png", "cdnetv2"],
|
130 |
["examples_png/water_22.png", "hrcloud"],
|
logs/train/runs/{hrcwhu_dual_branch → hrcwhu_dbnet}/2024-08-03_18-40-06/checkpoints/epoch_009.ckpt
RENAMED
File without changes
|
logs/train/runs/{hrcwhu_dual_branch → hrcwhu_dbnet}/2024-08-03_18-40-06/checkpoints/last.ckpt
RENAMED
File without changes
|
src/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (135 Bytes). View file
|
|
src/data/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (140 Bytes). View file
|
|
src/data/__pycache__/hrcwhu_datamodule.cpython-310.pyc
ADDED
Binary file (5.37 kB). View file
|
|
src/data/components/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (151 Bytes). View file
|
|
src/data/components/__pycache__/hrcwhu.cpython-310.pyc
ADDED
Binary file (3.15 kB). View file
|
|
src/models/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (142 Bytes). View file
|
|
src/models/__pycache__/base_module.cpython-310.pyc
ADDED
Binary file (8.71 kB). View file
|
|
src/models/components/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (153 Bytes). View file
|
|
src/models/components/__pycache__/cdnetv1.cpython-310.pyc
ADDED
Binary file (10.8 kB). View file
|
|
src/models/components/__pycache__/dual_branch.cpython-310.pyc
ADDED
Binary file (12.3 kB). View file
|
|
src/models/components/__pycache__/hrcloud.cpython-310.pyc
ADDED
Binary file (17.3 kB). View file
|
|
src/models/components/__pycache__/mcdnet.cpython-310.pyc
ADDED
Binary file (13.1 kB). View file
|
|
src/models/components/__pycache__/scnn.cpython-310.pyc
ADDED
Binary file (1.2 kB). View file
|
|
src/models/components/__pycache__/unet.cpython-310.pyc
ADDED
Binary file (2.1 kB). View file
|
|
src/utils/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (543 Bytes). View file
|
|
src/utils/__pycache__/instantiators.cpython-310.pyc
ADDED
Binary file (1.57 kB). View file
|
|
src/utils/__pycache__/logging_utils.cpython-310.pyc
ADDED
Binary file (1.96 kB). View file
|
|
src/utils/__pycache__/pylogger.cpython-310.pyc
ADDED
Binary file (2.54 kB). View file
|
|
src/utils/__pycache__/rich_utils.cpython-310.pyc
ADDED
Binary file (3.2 kB). View file
|
|
src/utils/__pycache__/utils.cpython-310.pyc
ADDED
Binary file (3.69 kB). View file
|
|