[CV] Image Segmentation 이란?
·
ML_DL/딥러닝 공부하기
Image Segmentation이미지 내의 각 픽셀의 class를 구분하는 Taskbounding box로 추출된 객체를 분류하는 object detection과는 다름 Semantic Segmentation이미지의 모든 pixcel에 class를 분류한다. (ex - 사람, 물건)같은 class의 속하는 pixcel을 동일하게 표시한다. (개별 객체는 구분되지 않는다)FCN, DeepLab, U-NetInstance Segmentation이미지의 모든 객체를 분리하여 식별한다. (ex - 사람1, 사람2, 사람3, 물건1)pixcel의 class 구분뿐만 아니라, 어떤 객체인지 구분한다.Mask R-CNN, Detectron, YOLACTPanoptice Segmentationsemantic + in..
[Llama3 파인튜닝] 코드 업데이트 및 실험 2
·
ML_DL/MUJAKJUNG (무작정 시리즈)
0. 환경 및 변경사항GPU : A6000 (VRAM 48GB)데이터 프롬프트 코드 변경def format_dataset(example): prompt = f"[INST] {example['instructions']}\n\n {example['inputs']} [/INST] {example['outputs']}" return {'text': prompt}epoch 5, per_device_train_batch_size 21. Out Of Memory"Shut Down Kernel" 로 GPU 메모리 Reset 후 해결 (라이브러리 및 모델 보존)per_device_train_batch_size를 4에서 2로 변경runpod 서버 활용 시, A6000으로 실험 (VRAM = 48GB)2. can..
[Llama3 파인튜닝] 파인튜닝 코드 작성 및 실험 1
·
ML_DL/MUJAKJUNG (무작정 시리즈)
0. 사전 준비Huggingface API Key 발급 Hugging Face – The AI community building the future. huggingface.coLlama3 model 발급 Llama3Today, we’re excited to share the first two models of the next generation of Llama, Meta Llama 3, available for broad use. This release features pretrained and instruction-fine-tuned language models with 8B and 70B parameters that can support a broad ranhuggingface.coGPU 대여 (ru..
[Streamlit] 앱 실행하기
·
ML_DL/MUJAKJUNG (무작정 시리즈)
Streamlit Streamlit • A faster way to build and share data appsStreamlit is an open-source Python framework for data scientists and AI/ML engineers to deliver interactive data apps – in only a few lines of code.streamlit.io Python을 기반으로한 오픈소스 라이브러리Data Science, Machine Learning Model 등을 별도의 프론트엔드 지식 없이 시각화 및 공유할 수 있다.Streamlit 설치 및 앱 실행pip 명령어로 간단한 설치 가능pip install streamlitstream run test.py로 간..
[OpenAI] OpenAI API 발급 및 request
·
ML_DL/MUJAKJUNG (무작정 시리즈)
OpenAI KeyGPT, DALL-E 등 openai가 제공하는 모델들을 API 형태로 사용하기 위해 필요한 키개인에게 발급되기 때문에, 외부 공유 없이 보안에 신경써야 한다. (해킹을 통한 과금 방지)기존 user key가 아닌 project 별 관리를 위한 project key 사용을 권장하고 있다.처음 팝업에서 복사하지 못하거나 key를 잊어버릴 경우는 삭제하고 재발급해야 한다.API Key 환경변수 등록하드코딩으로 API Key를 사용할 수 있으나, github나 코드 공유 시 문제가 될 수 있다.환경변수에 원하는 변수 이름, 변수 값에는 발급받은 OpenAI Key를 저장하고 등록한다.os를 통해 저장한 변수를 가져올 수 있다.import osapi_key = os.environ.get('등록..
Ollama 설치 및 Llama3.1 모델 사용
·
ML_DL/딥러닝 공부하기
Ollama 설치Ollama : 로컬에서 LLM을 쉽게 다운받고 활용할 수 있도록 만든 도구OS에 맞는 Ollama 설치설치 후, 터미널에서 ollama로 설치 완료 확인 가능Llama 3.1 모델 설치ollama run Llama3.1Llama3.1 한국어 테스트세종대왕 맥북 던짐 사건현재 대한민국의 대통령수학 문제 및 기억력