[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..
[Baekjoon] 2493. 탑
·
코딩테스트/Python
🔗 Problem Linkhttps://www.acmicpc.net/problem/2493❔Thinking탑의 높이가 주어진 배열에서, 현 위치 왼쪽에 위치한 높은 탑의 가장 가까운 위치를 담아 반환한다.동일한 높이의 탑도 포함하여 확인한다.결국, 자신보다 높지 않은 탑은 비교 대상에서 제외된다.💻Solutionimport sysinput = sys.stdin.readlineN = int(input().rstrip())buildings = list(map(int, input().split()))laser = [0] * Nstack = [(0,0)] # (위치, 높이)for idx, height in enumerate(buildings): while stack and stack[-1][1] 🗝️..
[Programmers] Level 2. 요격 시스템
·
코딩테스트/Python
🔗 Problem Link 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr❔Thinking개구간 (s, e)들이 주어질 때, 모든 구간을 통과하는 막대의 최소 개수를 반환한다.s나 e에서는 해당 구간을 통과할 수 없다. 💻Solutiondef solution(targets): answer = 0 targets = sorted(targets, key=lambda x: x[1]) e = 0 for i in range(len(targets)): if targets[i][0] >= e: answer += 1 e = targets[i][..
[Baekjoon] 1101. Fly me to the Alpha Centauri
·
코딩테스트/Python
🔗 Problem Linkhttps://www.acmicpc.net/problem/1011❔Thinkingx,y 두 좌표가 주어지면, x에서 y로 가는 최소 이동 횟수를 반환한다.이전에 k번 이동했다면, 다음은 k-1, k, k+1를 이동할 수 있다.y에 도착하는 이동은 1이어야 한다.💻Solutiondef alpha_centauri(x, y): distance = y - x move = 0 step = 1 total_moved = 0 while total_moved 🗝️keypoint최소한으로 이동하기 위해서는 점차 이동 거리를 늘려야 하고, y에 1을 이동하여 도착하기 위해서는 이동 거리를 점차 줄여나가야 한다. (ex - 1, 2, 3, 2, 1)같은 거리의 이동이 ..
[Programmers] Level 2. 과제 진행하기
·
코딩테스트/Python
🔗 Problem Link 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr❔Thinking주어진 과제를 조건에 맞춰 해결할때, 해결한 과제 순으로 반환한다.새로운 과제는 잠시 멈춘 과제보다 언제나 우선적으로 해결한다.잠시 멈춘 과제는 최근에 멈춘 순서대로 진행한다.💻Solutiondef solution(plans): completed = [] stopped = [] plans = sorted(plans, key=lambda x: x[1]) now_name, now_start, now_playtime = plans[0][0], int(plans[0][1].split(":")[0])..
[Beakjoon] 9663. N-Queen
·
코딩테스트/Python
🔗 Problem Linkhttps://www.acmicpc.net/problem/9663❔Thinking체스판의 퀸의 이동경로가 겹치지 않도록 N개를 놓는 방법의 수를 구한다.퀸은 상하좌우, 대각선 모두를 이동할 수 있다.💻Solutionn = int(input())def put_queen(row:int): global left_right, yx, y_x, cnt, n if row == n: cnt += 1 return for i in range(n): if left_right[i] is False and yx[row+i] is False and y_x[(n-1) + row-i] is False: left_right[i] = ..