sghong977 / Daily_AIML

Computer Vision, Deep Learning, 그외 MLOps 찍먹 등. 매일 새롭게 배운 것을 정리합니다.
0 stars 0 forks source link

mmseg #39

Open sghong977 opened 1 month ago

sghong977 commented 1 month ago

mmseg 0.20.0

git clone https://github.com/Traffic-X/ViT-CoMer.git

sghong977 commented 1 month ago

시도 1. withAI 다른건 설치 되는데 make가 안됨. sudo 권한 없어서 그런듯. 지금 실험땜에 인스턴스 내릴 수 있는 상황이 아니므로 그냥 다른 컴퓨터 쓰자


docker 내부에 ㄱㄱ

sghong977 commented 1 month ago

Dataset

mmseg 기반 구현이므로 여기서 지원하는 데이터셋이면서 + 우리 domain에 쓸만한거. SUN이나 NYU는 안보임

ADE20k

sghong977 commented 1 month ago

ONE PEACE https://github.com/OFA-Sys/ONE-PEACE/blob/main/one_peace_vision/seg/README.md

pretrained model 크기만 9.2GB...ㅋㅋㅋ


ViT Adapter https://github.com/czczup/ViT-Adapter/tree/main/segmentation


(python 3.8.10)

docker run --gpus 5 --init --rm --name sghong_3_SemanticSeg --shm-size 32G -v $(pwd):/workspace -it base-ai-serving-env:pytorch1.7-cuda11.2-ubuntu20.04

이러고 대충 깔면 어찌저찌 잘 됨...

결과

issues

sghong977 commented 1 month ago

요즘은 이렇다.

아래 내용을 찾아보면 될거같다.

image

sghong977 commented 1 month ago

train custom

Issues

  1. https://github.com/shanice-l/gdrnpp_bop2022/issues/95

    • pip install yapf==0.40.1
  2. size error image

image

mask 값을 0, 255 -> 0 or 1로 변경

  1. num class 지정 Mask2Former에서 stuff, thing class를 각각 지정하라고 나오는데 어떻게 해야할지 걍 stuff 1, 다른거 0 해놓으니까 아래처럼 2개로 뜬다.. 음.. 일단 돌려보자 image

null class는 뭔데.. https://huggingface.co/docs/transformers/main/en/model_doc/mask2former image

어차피 background = class num 0, camera = 1 이렇게니까 Null로 들어가는거 아닌가...? 1로 지정했는데 안되려나 흠


일단 돌려는 놓고, 설명을 보자

image


학습 안됨.... output 전부 단색으로 나옴;; 왜 class 개수는 +1되어서 나오는거지? https://github.com/open-mmlab/mmsegmentation/issues/1520 https://mmsegmentation.readthedocs.io/en/main/notes/faq.html#how-to-handle-binary-segmentation-task

sghong977 commented 1 month ago

Installation

git clone ViT-Adapter 되어있다는 가정 하에 진행 https://github.com/czczup/ViT-Adapter.git

conda create --name mmseg python=3.8.10 source activate mmseg

conda install pytorch=1.9.0 torchvision torchaudio pytorch-cuda cudatoolkit=11.1 -c pytorch -c nvidia pip install mmcv-full==1.4.2 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9.0/index.html pip install timm==0.4.12 pip install mmdet==2.22.0 # for Mask2Former pip install mmsegmentation==0.20.2 ln -s ../detection/ops ./

" Unknown CUDA arch (9.0+PTX) or GPU not supported"

sghong977 commented 1 month ago

MultiScaleDeformableAttention Installation Error

ValueError: Unknown CUDA arch (9.0+PTX) or GPU not supported

image

How to solve?

just add 9.0 to the list! image https://github.com/NVIDIA/apex/issues/615#issuecomment-555975202