현재 대기업 중심으로 아래와 같은 프로젝트의 개발책임 및 컨설팅을 맡고 있습니다. 현역^^입니다.
더불어, 고려대 대학원에서 인공지능 관련 겸임교수로도 활동하고 있습니다.
저의 목표는 실전에 바로 써먹을 수 있는 현장감 있는 프로그래밍 기술입니다. 앞으로 많은 여러분과 함께 재미난 수업 만들어 나가고 싶습니다.
엔터프라이즈 인공지능 구조 및 서비스 설계
머신러닝 서비스 구현
벡엔드 서비스 개발
클라우드(Azure) Databricks, ETL, Fabric 등 각종 클라우드 환경에서의 데이터베이스 구축 및 서비스 개발
Courses
Reviews
main33730814
·
All-in-one masterclass from development to deployment for computer vision anomaly detectionAll-in-one masterclass from development to deployment for computer vision anomaly detectioneverythx
·
All-in-one masterclass from development to deployment for computer vision anomaly detectionAll-in-one masterclass from development to deployment for computer vision anomaly detection- All-in-one masterclass from development to deployment for computer vision anomaly detection
cjnyung5173
·
All-in-one masterclass from development to deployment for computer vision anomaly detectionAll-in-one masterclass from development to deployment for computer vision anomaly detection
Posts
Q&A
이미지 노이즈 추가하는 코드 공유 부탁드립니다.
안녕하세요~많이 답답하셨겠네요.필요하신 코드를 공유합니다~import numpy as np import matplotlib.pyplot as plt from PIL import Image, ImageDraw from pathlib import Path def load_image(file_path: Path) -> np.array: """ Load an image from a given file path and convert it to a NumPy array. Args: file_path (Path): Path to the image file. Returns: np.array: The image as a NumPy array. """ pil_image = Image.open(file_path) return np.array(pil_image) def add_irregular_patch(noisy_image: np.array, patch_pixels: int, noise_value: int) -> np.array: """ Adds an irregular, polygonal noise patch to the image. Args: noisy_image (np.array): The image array to modify. patch_pixels (int): Approximate area of the noise patch in pixels. noise_value (int): Noise value (255 for salt, 0 for pepper). Returns: np.array: The modified image with the noise patch added. """ img_pil = Image.fromarray(noisy_image) draw = ImageDraw.Draw(img_pil) img_width, img_height = img_pil.size # Estimate an average radius from the patch area (area ≈ πr²) r = int(np.sqrt(patch_pixels / np.pi)) r = max(r, 5) # Ensure a minimum patch size # Choose a random center where the patch can fit center_x = np.random.randint(r, img_width - r) center_y = np.random.randint(r, img_height - r) # Random number of vertices for the irregular polygon num_points = np.random.randint(5, 10) angles = np.linspace(0, 2 * np.pi, num_points, endpoint=False) angles += np.random.uniform(0, 2 * np.pi / num_points, size=num_points) # Generate random radii for each vertex around the average radius radii = np.random.uniform(0.5 * r, 1.5 * r, size=num_points) # Create the polygon points points = [ (int(center_x + radius * np.cos(angle)), int(center_y + radius * np.sin(angle))) for angle, radius in zip(angles, radii) ] # Set the fill color based on image mode fill_color = (noise_value, noise_value, noise_value) if img_pil.mode == 'RGB' else noise_value draw.polygon(points, fill=fill_color) return np.array(img_pil) def random_patch_areas(total: int, num_patches: int) -> np.array: """ Split the total noise area into a random distribution of patch areas that sum to total. Args: total (int): Total number of noisy pixels for this noise type. num_patches (int): Number of patches. Returns: np.array: Array of patch areas. """ areas = np.random.rand(num_patches) areas = areas / areas.sum() # Normalize so areas sum to 1 areas = (total * areas).astype(int) # Adjust in case of rounding issues diff = total - areas.sum() areas[0] += diff return areas def apply_random_irregular_noise(image: np.array, amount: float, salt_vs_pepper: float) -> np.array: """ Applies random irregular noise patches (both salt and pepper) to an image. Args: image (np.array): The original image. amount (float): Fraction of total image pixels to be noised. salt_vs_pepper (float): Fraction of noise that is salt (white). Returns: np.array: The noisy image. """ noisy = image.copy() total_pixels = image.shape[0] * image.shape[1] num_pixels = int(amount * total_pixels) # Calculate noise areas for salt and pepper num_salt = int(salt_vs_pepper * num_pixels) num_pepper = num_pixels - num_salt # Randomly determine number of patches (e.g., 1 to 3 patches) num_salt_patches = np.random.randint(1, 10) num_pepper_patches = np.random.randint(1, 10) # Split the noise area into patch areas salt_patch_areas = random_patch_areas(num_salt, num_salt_patches) pepper_patch_areas = random_patch_areas(num_pepper, num_pepper_patches) # Add salt noise patches for area in salt_patch_areas: noisy = add_irregular_patch(noisy, area, 255) # Add pepper noise patches for area in pepper_patch_areas: noisy = add_irregular_patch(noisy, area, 0) return noisy def plot_images(original: np.array, noisy: np.array) -> None: """ Plots the original and noisy images side by side. Args: original (np.array): The original image. noisy (np.array): The noisy image. """ fig, axes = plt.subplots(1, 2, figsize=(10, 5)) axes[0].imshow(original) axes[0].set_title("Original Image") axes[0].axis("off") axes[1].imshow(noisy) axes[1].set_title("Image with Random Irregular Noise Patches") axes[1].axis("off") plt.tight_layout() plt.show() def main(file_path:Path, amount:float, salt_vs_pepper:float): # Load the image image = load_image(file_path) # Apply the noise noisy_image = apply_random_irregular_noise(image, amount, salt_vs_pepper) pil_image = Image.fromarray(noisy_image) # save noisy image output_file_path = Path('noisy_frames') / f"{file_path.stem}_noisy{file_path.suffix}" output_file_path.parent.mkdir(exist_ok=True) pil_image.save(output_file_path, format='JPEG') # Display the original and noisy images plot_images(image, noisy_image) if __name__ == "__main__": file_path = Path('frames') / 'frame_0.jpg' amount = 0.01 # Fraction of image pixels to be noised salt_vs_pepper = 0.6 # Fraction of noise that is salt (white) main(file_path, amount, salt_vs_pepper)
- 0
- 3
- 17
Q&A
df 에서 바이너리 값 이미지로 안보이는 현상
안녕하세요, 열공 하시는 모습 너무 보기 좋습니다~^^ 일단, metadata 적용에는 문제가 없습니다. spark 3.3+ 이면 메타데이터를 통해 display() 를 통해 df 의 이미지를 출력하는 것은 정상적으로 이루어져야 합니다. 일단, 두 가지를 의심해 볼 수 있겠네요. 1. path.replace("dbfs:", "") 부분이 문제가 있어 보이네요. /dbfs 가 데이터브릭스 볼륨의 기본 단위일텐데, 이것을 삭제한 것이 문제가 되는 지 체크해 보세요. from PIL import Image 호출이 안되어 있는데, 이 부분도 체크 한 번 해 보시구요.이렇게 해서도 해결이 안된다면,pandas_udf 로 만들기 전에 샘플 경로 하나를 가지고 정상적으로 작동하는 지 확인 후에 최종적으로 사용하면 udf로 만들어 사용한다면 아마 오류를 잡아낼 수 있지 않을까 생각합니다. 그럼 열공하세요!
- 0
- 1
- 21
Q&A
코드 자료 요청
네, 이메일 보냈습니다. 확인해 보세요.열공!
- 0
- 2
- 25
Q&A
o3-mini 모델은 이미지를 지원안하나요
안녕하세요! o3-mini 는 비전 기능을 지원하지 않는 것으로 알고 있습니다. STEM 중심의 시나리오에 적합하는 모델이라고 생각하시면 될 것 같아요. 코드를 따라하면서 아마 다양한 모델을 테스트 해 보시는 것 같은데요, 가끔 이렇게 오류가 나면 당황스러울 수 있습니다. 그럴 땐, 모델이 지원하는 기능의 한계 등의 자료를 찾아보면 도움이 됩니다^^ 그럼 열공하세요~
- 0
- 1
- 21
Q&A
통합 프레임워크 강의 요청드립니다
안녕하세요,강의가 도움이 되었다니 기쁩니다. MLOps 에 대하여 관심이 많으시군요. 생성형 AI 시대에 간과하기 쉬운 ML의 중요성을 잘 알고 있으셔서, 뛰어난 개발자가 될 것이라 믿습니다. 안그래도 인프런 측에서 MLOps 강의에 대한 요청을 꾸준히 해 와서 어떤 주제를 다룰까 구상중이었는데요. 현재 작업중인 RAG All Master 강의가 완료되는대로 MLOps 강의를 준비해 봐야겠다는 생각이 드네요. 혹시 본인은 물론 학습자의 입장에서 생각하고 있는 좀 더 구체적인 end-to-end MLOps 강의에 대한 의견을 주시면 고맙겠습니다.특히, '실제로 사용하는 모습', '파트당 연결되는 부분', '최종적으로 배운 것들의 융합' 이란 키워드에서 느낀 점은, 학습용 관점이 아닌 '온전히 기능하는 MLOps' 실전 프로젝트 또는 실전 프로젝트와 동일한 스케일의 내용이 담겨졌으면 하는 것으로 읽힙니다.^^ 피드백 주시면 고맙겠습니다~
- 1
- 2
- 34
Q&A
32강 강의가 짤린거 같습니다.
안녕하세요, 불편함을 드려 죄송하네요. 저도 무척 당황했는데요, 강의가 잘린 것이 아니라, 인프런 서버 쪽에 문제인 것 같습니다. 강의 영상은 정상적으로 업로드 되었고, 지금까지 이와 같은 문제는 없었거든요.혹시나, 해서 다시 들어가 봐도 영상에는 문제가 없는 것을 확인하였습니다. 고객센터로 문의를 해 주셔야 할 것 같아요. 만일 일시적인 인프런 서버 장애였다면, 아마 제가 답변을 작성하고 있는 지금쯤 문제가 해결되지 않았을까 싶습니다. 그럼 열공하시구요~감사합니다.
- 0
- 2
- 22
Q&A
체험 계정에서는 End-point 생성이 안 되는걸까요?
안녕하세요,강의 마지막 과정까지 도달하셨군요. 배움의 열정에 격하게 응원합니다! 질문하신 내용을 확인해 보니, 저도 몇 달 만에 databricks 에 들어와 봅니다. 질문하신 내용을 확인해 보니 Legacy serving[deprecated] 라고 나오네요. 아래 캡쳐 화면을 참고하세요.뭐, 그렇다고 databricks 에서 model serving endpoint 라는 기능 자체를 없앨 수는 없구요(왜냐하면, 이 기능이 없다면 누가 databricks 사용하겠습니까^^). 자세히 보면 우측 상단에 'Use model for inference' 메뉴가 대신 생겼네요. 이곳에서 endpoint 를 생성해서 사용하도록 되어 있네요. 내용을 살펴보니, 종전에 legacy serving 에서의 endpoint 와는 달리 Real-time, Streaming, Batch Inference 로 세분화 되엇 모델을 서빙할 수 있도록 되어 있네요. 이 가운데, 실제로 REST API 같은 개념에 해당하는 (종전의 legacy serving) 것은 'Real-time' 이네요. 그럼 끝까지 완강하시고! 열공! Legacy serving 메뉴 더 이상 제공 안함(사진) 새로운 메뉴: Use model for Inference (사진)
- 0
- 1
- 29
Q&A
이상치 데이터 합성 및 기본데이터셋 생성
^^모든 코드는 github 에 있어요.강의 안내에 올라가 있답니다~
- 0
- 2
- 50
Q&A
파티션 이해하기 강의 부분 질문있습니다.
네, 문제 없습니다. Spark 의 동작 핵심 원리에 대한 이해를 위한 부분이며, 개념적인 이해를 돕기위한 선에서 자연스럽게 넘어가면 됩니다. 열공하세요~
- 1
- 2
- 32
Q&A
OrderedDict() 질문
네, 맞습니다. 알고 있는 바 대로, 해당 코드에서는 굳이 OrderedDict() 를 사용할 필요는 없습니다.저의 오랜 습관입니다^^
- 1
- 1
- 40