no image
rtsp 에서 hls 변환할 때 영상이 보이지 않음
Chrome의 방화벽 문제인 것 같음 http형식에서는 비디오, 녹화가 setting에서 보면 막혀있는 것을 볼 수 있음
2024.04.22
no image
Gstreamer
rtph264depay (RTP H264 Depayloading): Gst.ElementFactory.make("rtph264depay", f"depay{index}")는 RTP (Real-time Transport Protocol) 패킷에서 H.264 비디오 스트림을 추출하는 데 사용되는 요소를 생성합니다. 이 요소는 네트워크를 통해 전송되는 RTP 패킷에서 H.264 비디오 데이터를 분리해 내어 다음 요소로 전달할 수 있는 형태로 변환합니다. 이 과정을 'de-payloading'이라고 합니다. capsfilter (Capabilities Filter): Gst.ElementFactory.make("capsfilter", f"caps{index}")는 미디어 스트림의 데이터 포맷을 제어하는 필터 요소..
2024.04.15
no image
Jetson Yolov8 tutorial : ModuleNotFoundError: No module named 'ultralytics.yolo'
https://wiki.seeedstudio.com/YOLOv8-DeepStream-TRT-Jetson/ Deploy YOLOv8 with TensorRT and DeepStream SDK | Seeed Studio Wiki Deploy YOLOv8 on NVIDIA Jetson using TensorRT and DeepStream SDK - Data Label, AI Model Train, AI Model Deploy wiki.seeedstudio.com from ultralytics.YOLO.utils.torch_utils import select_device from ultralytics.YOLO.utils.tal import make_anchors line 4~5 줄을 아래와 같이 바꾸면 됩니다...
2024.04.05
no image
Ubuntu, tmux 명령어
Ubuntu # 화면분할 screen # 세로 화면 분리 Ctrl + a + | # 가로 화면 분리 Ctrl + a + S # 분리된 화면으로 커서 이동 Ctrl + a + Tab # 분리된 새 화면에 쉘 실행 Ctrl + a , c Tmux # 세션 내 활성창 종료 CTRL + B, X # 세션 내 전체 창 종료 Ctrl + b , & # 세션 내 창 회전 ctrl + b , ctrl + o # 세션 이름 변경 ctrl+b ,, # 윈도우 이동 tmux move-window # tmux 가로 화면 분할 ctrl + b , % # tmux 세로 화면 분할 ctrl + b , "
2024.04.05
no image
[프로그래머스] 영어 끝말잇기
def solution(n, words): pos = [0 for _ in range(n)] pos[0] = 1 lst = set([words[0]]) for i in range(1, len(words)): pos[i % n] += 1 if words[i-1][-1] != words[i][0]: return (i % n) +1, pos[i%n] elif words[i] not in lst: lst.add(words[i]) else: return (i % n) +1, pos[i%n] return [0,0] 나는 position을 행렬을 만들어서 식을 넣었지만 몫을 계산해서 몇번째 행인지 알 수 있음 def solution(n, words): for p in range(1, len(words)): if wo..
2024.03.24
no image
[프로그래머스] 연속 부분 수열 합의 개수
def over_coverage(idx , max_len): if idx > max_len: additional_idx = idx-max_len return additional_idx else: return None def calculate(start, end , elements): # print(start, end) additional_idx = over_coverage(end, len(elements)) if additional_idx: result = sum(elements[start:end])+sum(elements[:additional_idx]) else: result = sum(elements[start:end]) return result def solution(elements): answer..
2024.03.24
no image
Opencv 설치시 fatal error: va/va.h: No such file or directory 오류
libva-dev 패키지에 포함된 va/va.h 헤더 파일을 찾을 수 있어야 하는데 못찾아서 생긴 오류입니다. VA API는 비디오 가속을 위한 오픈소스 라이브러리입니다. 대부분의 Linux 배포판에서는 libva-dev 패키지에 해당 파일들이 포함되어 있습니다. sudo apt-get updatesudo apt-get install libva-dev위 코드를 실행하고도 다시 빌드하여도 안될경우에는 cmake -DCMAKE_CXX_FLAGS="-I/usr/include/va" -DCMAKE_C_FLAGS="-I/usr/include/va" ../{opencv_path}위와 같이 헤더파일 경로를 추가적으로 명시하여 해결할 수 있습니다.
2024.03.12
no image
Pytorch Tips(정리중)
torch.numel torch.numel input tensor에 대해 element의 총 개수를 return >>> a = torch.randn(1, 2, 3, 4, 5) >>> torch.numel(a) 120 >>> a = torch.zeros(4,4) >>> torch.numel(a) 16
2023.04.03
no image
Pythonic한 코드를 위해서(정리중)
Python 에러 핸들링 방식: Printing vs Logging # option A try: do_something_that_might_error() except Exception as error: traceback.print_exc() # option B import logging logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) try: do_something_that_might_error() except Exception as error: logger.exception(error) 파이썬의 dictionary 접근방식 # option A example_dict = {'foo': 'bar'} if exampl..
2023.04.03