You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

LandViT-DPT-330m

Land Cover Vision Transformer for Semantic Segmentation

์ด ๋ชจ๋ธ์€ ํ•ญ๊ณต ์˜์ƒ์—์„œ ํ† ์ง€ ํ”ผ๋ณต์„ 11๊ฐœ ํด๋ž˜์Šค๋กœ ๋ถ„๋ฅ˜ํ•˜๋Š” Semantic Segmentation ๋ชจ๋ธ์ž…๋‹ˆ๋‹ค.

๋ชจ๋ธ ์ •๋ณด

  • ๋ชจ๋ธ ๊ตฌ์กฐ: Vision Transformer (ViT) + DPT-style Decoder
  • ์ž…๋ ฅ ํ•ด์ƒ๋„: 512ร—512ร—3
  • ํด๋ž˜์Šค ์ˆ˜: 11 (๋ฐฐ๊ฒฝ ํฌํ•จ)
  • ํ”„๋ ˆ์ž„์›Œํฌ: PyTorch + Hugging Face Transformers

์„ฑ๋Šฅ ์ง€ํ‘œ

์ง€ํ‘œ ๊ฐ’
mIoU (์ถ”๊ฐ€ ์˜ˆ์ •)

ํด๋ž˜์Šค ์ •๋ณด

ID ํด๋ž˜์Šค ์ฝ”๋“œ ์ƒ‰์ƒ
0 ๋ฐฐ๊ฒฝ 100, 255 #000000 #000000
1 ๊ฑด๋ฌผ 10 #B883ED #B883ED
2 ์ฃผ์ฐจ์žฅ 20 #1040B2 #1040B2
3 ๋„๋กœ 30 #2A41F7 #2A41F7
4 ๊ฐ€๋กœ์ˆ˜ 40 #C8E59B #C8E59B
5 ๋…ผ 50 #BFFFFF #BFFFFF
6 ๋น„๋‹ํ•˜์šฐ์Šค 55 #DCF0FF #DCF0FF
7 ๋ฐญ 60 #66F9F7 #66F9F7
8 ์‚ฐ๋ฆผ 70 #2D4B2A #2D4B2A
9 ๋‚˜์ง€ 80 #FFF29F #FFF29F
10 ๋†๊ฒฝ์ง€ 90 #D2B48C #D2B48C

์‚ฌ์šฉ ๋ฐฉ๋ฒ•

์„ค์น˜

pip install torch torchvision transformers pillow numpy

๊ธฐ๋ณธ ์ถ”๋ก 

import torch
from PIL import Image
from transformers import AutoModelForSemanticSegmentation, AutoImageProcessor

# ๋ชจ๋ธ ๋กœ๋“œ
model = AutoModelForSemanticSegmentation.from_pretrained(
    "JDONE-Research/LandViT-DPT-330m",
    trust_remote_code=True
)
processor = AutoImageProcessor.from_pretrained(
    "JDONE-Research/LandViT-DPT-330m",
    trust_remote_code=True
)

# ์ด๋ฏธ์ง€ ๋กœ๋“œ
image = Image.open("image.jpg")

# ์ „์ฒ˜๋ฆฌ
inputs = processor(images=image, return_tensors="pt")

# ์ถ”๋ก 
with torch.no_grad():
    outputs = model(**inputs)

# ํ›„์ฒ˜๋ฆฌ
segmentation_map = processor.post_process_semantic_segmentation(
    outputs, target_sizes=[(image.height, image.width)]
)[0]

print(f"Segmentation shape: {segmentation_map.shape}")

์‹œ๊ฐํ™”

import numpy as np
import matplotlib.pyplot as plt

# ๋ชจ๋ธ ์„ค์ •์—์„œ ํŒ”๋ ˆํŠธ ๊ฐ€์ ธ์˜ค๊ธฐ
palette = model.config.label_colors

# ์ปฌ๋Ÿฌ ๋งˆ์Šคํฌ ์ƒ์„ฑ
color_mask = np.zeros((*segmentation_map.shape, 3), dtype=np.uint8)
for class_id, color in enumerate(palette):
    color_mask[segmentation_map == class_id] = color

# ์‹œ๊ฐํ™”
fig, axes = plt.subplots(1, 2, figsize=(15, 5))
axes[0].imshow(image)
axes[0].set_title("Original Image")
axes[0].axis("off")

axes[1].imshow(color_mask)
axes[1].set_title("Segmentation Result")
axes[1].axis("off")

plt.tight_layout()
plt.show()

๋ฐฐ์น˜ ์ถ”๋ก 

# ์—ฌ๋Ÿฌ ์ด๋ฏธ์ง€ ์ฒ˜๋ฆฌ
images = [Image.open(f"image_{i}.jpg") for i in range(4)]

inputs = processor(images=images, return_tensors="pt")

with torch.no_grad():
    outputs = model(**inputs)

segmentation_maps = processor.post_process_semantic_segmentation(
    outputs, target_sizes=[(img.height, img.width) for img in images]
)

for i, seg_map in enumerate(segmentation_maps):
    print(f"Image {i} segmentation shape: {seg_map.shape}")

์ œํ•œ ์‚ฌํ•ญ

  • ํ•ญ๊ณต ์˜์ƒ์— ์ตœ์ ํ™”๋˜์–ด ์žˆ์œผ๋ฉฐ, ๋‹ค๋ฅธ ๋„๋ฉ”์ธ์˜ ์˜์ƒ์—์„œ๋Š” ์„ฑ๋Šฅ์ด ์ €ํ•˜๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • 512ร—512 ํ•ด์ƒ๋„๋กœ ํ•™์Šต๋˜์–ด, ์ด๋ณด๋‹ค ํฐ ์ด๋ฏธ์ง€๋Š” ํŒจ์น˜ ๋‹จ์œ„๋กœ ์ฒ˜๋ฆฌํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
  • ํ•œ๊ตญ ์ง€์—ญ ๋ฐ์ดํ„ฐ๋กœ ํ•™์Šต๋˜์–ด, ๋‹ค๋ฅธ ์ง€์—ญ์—์„œ๋Š” fine-tuning์ด ํ•„์š”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์ผ๋ถ€ ํด๋ž˜์Šค(์ฃผ์ฐจ์žฅ, ๋น„๋‹ํ•˜์šฐ์Šค ๋“ฑ)๋Š” ๋ฐ์ดํ„ฐ ๋ถˆ๊ท ํ˜•์œผ๋กœ ์ธํ•ด ์ƒ๋Œ€์ ์œผ๋กœ ๋‚ฎ์€ ์ •ํ™•๋„๋ฅผ ๋ณด์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Citation

@misc{landvit2026,
  title={LandViT: Land Cover Vision Transformer for Semantic Segmentation},
  author={JDONE Inc.},
  year={2026},
  publisher={Hugging Face},
  howpublished={\url{https://huggingface.co/JDONE-Research/LandViT-DPT-330m}}
}
Downloads last month
2
Safetensors
Model size
0.3B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support