반응형
반응형

오늘의 개발 뉴스 — 2026년 12월 3일 (목)

⚠ 조치 필요

  • usb2shell (CVE-2026-98232) — Linux 6.5 이상 영향. 6.6.158 / 6.12.112 / 6.18.54 / 7.2.8 / 7.3 으로 커널 업데이트, 당장 어렵다면 usb-storage·uas 모듈 차단 또는 USBGuard 적용.
  • Next.js 12월 보안 릴리스 — 16.5.x 라인, 12월 15일 공개 예정(High 8건 포함 10건). 15일 패치 버전 즉시 적용할 수 있게 배포 일정 확보.

주요 글

Linux SCSI 코어의 scsi_cdl_enable()에 스택 범위 밖 쓰기 결함이 있어, 조작된 USB 저장장치를 연결하는 것만으로 root 명령 실행이 가능하다. 11월 30일 공개됐고 Linux 6.5 이상이 영향을 받으며, 수정 버전은 6.6.158·6.12.112·6.18.54·7.2.8·7.3이다. 물리 접근이 가능한 키오스크·사무용 PC·CI 러너는 커널 업데이트가 우선이고, 임시로 usb-storage/uas 차단이나 USBGuard를 권한다.

[usb2shell.com]#보안#Linux#CVEGN ↗ 10

Next.js 팀이 2주 사전 고지로 12월 15일 보안 릴리스를 예고했다. 수정 대상은 High 8·Medium 1·Low 1 등 10건이며 Vercel의 Next.js 통합 기능 Medium 1건도 함께 고친다. 16.5.0 마이너는 12월 2일 나왔고, 패치는 16.5.x 라인으로 나올 예정이라 지금 16.5로 올려 두면 15일 적용이 수월하다. 권고문은 릴리스와 동시에 공개된다.

[Next.js 블로그]#보안#Next.js#프론트엔드devday ↗

Anthropic이 모듈 격자에 대한 양자 준다항 시간 공격을 제시했지만, CIRG는 NIST 표준 ML-KEM/ML-DSA를 깨려면 기존 공격보다 훨씬 많은 자원이 드는 "galactic" 규모라 실질 위협이 아니라고 평가하고 PQC 전환을 그대로 이어가라고 권고했다. 비구조 격자에 대한 고전 공격 개선도 없었다. GeekNews에 함께 올라온 Ben Recht의 글은 이 결과가 "AI가 2048비트 RSA를 깼다"는 소문으로 부풀려진 과정을 짚는다.

[CIRG · argmin.net]#보안#양자암호#Anthropicdevday ↗GN ↗ 2GN ↗ 6

12월 1일 1.0이 나오며 프로덕션 사용 권장 단계가 됐다. OpenAI가 기본 타입 검사기로 채택했고 내부 마이그레이션에서 중앙값 24배 빠르고 피크 메모리는 73% 줄었다고 한다. PyPI 월 다운로드가 1년 새 1.7M→49.6M으로 늘었으며 uv tool install ty@latest로 설치한다. mypy/pyright에서 옮길지 검토할 시점이다.

[Astral 블로그]#Python#릴리스#Rustdevday ↗GN ↗ 3

8월 SpaceX의 Cursor 인수에 이어, 11월 30일 Cursor와 Grok의 코딩 제품을 Grok Build 브랜드로 합친다고 발표했다. Cursor는 Grok Build 데스크톱 앱이 되고, Grok Build TUI는 Cursor의 에이전트 하네스와 서드파티 모델을 탑재한다. 12월 7일부터 Slack·GitHub 연동에서 @Cursor 대신 @Build를 써야 하므로 팀 워크플로 문서와 봇 멘션을 미리 바꿔 둬야 한다.

[grok.com]#AI코딩#개발도구#릴리스GN ↗ 1

AI가 생성한 코드에 반복적으로 나타나는 "슬롭" 패턴 9가지를 위험도 등급과 함께 정리한 목록이다. 무엇이든 하는 만능 클래스, 의미 없는 테스트 과잉, 정규식으로 XML 파싱 같은 사례와 각각의 고치는 법을 제시해 코드 리뷰 체크리스트로 바로 쓸 만하다. 오늘 GeekNews 신규 글 중 추천수 1위.

[ohadravid.github.io]#AI코딩#코드리뷰GN ↗ 16

Maarten Grootendorst가 Pi(v1.2.0), OpenCode(v2.0.29), Hermes, OpenClaw(v2026.10.3)와 교육용 TinyAgent를 그림으로 비교하며 도구 호출 루프·컨텍스트 관리·권한 모델의 차이를 설명한다. 같은 LLM이라도 하네스 설계에 따라 전혀 다른 에이전트가 된다는 점을 보여 줘, 사내 에이전트를 직접 짜려는 팀에 좋은 입문서다.

[Maarten Grootendorst 뉴스레터]#AI에이전트#하네스GN ↗ 29

개발자 개입의 75% 이상이 "AI가 멈춰서 답해 주는 일"이었다는 진단에서 출발해, 사람은 캔버스 검수와 MR 검수 두 지점만 맡고 나머지는 AI가 CI에서 원격 수행하도록 바꿨다. 공통 스킬과 하네스는 GitLab MR로 관리하고 컴파일·테스트 → 독립 AI 세션 리뷰 → 베타 DB 연동 확인의 3단계 검증을 거친다. 리뷰 코멘트 응답 시간이 23.1시간에서 8.4분으로 줄었다.

[우아한형제들 기술블로그]#AI에이전트#CI/CD#국내기술블로그devday ↗

10월 24일~11월 22일 코딩 에이전트 트래픽을 분석한 결과, 캐시 만료로 인한 재작성 비용이 Claude 청구액의 23.1%, GPT는 9.3%였다. 특히 5~30분 공백 구간에서 Claude 15.2% 대 GPT 0.8%로 격차가 컸다. max_tokens: 0 keep-alive 핑을 보내면 순절감이 약 8~9%로 추정돼, 사람이 중간에 검토하는 에이전트 워크플로라면 적용을 검토할 만하다.

[Requesty 블로그]#LLM#비용최적화GN ↗ 4

Amazon이 엔터프라이즈 에이전트와 소프트웨어 개발에 맞춘 오픈 웨이트 모델 Ergo를 공개했다. Trainium3에서 초당 400토큰 이상, 입력 100만 토큰당 $1을 내세우고 Bedrock에서는 데이터 미저장 정책이 적용된다. 다만 라이선스의 "안전 조치 우회 금지" 조항이 오픈 웨이트 취지와 맞지 않는다는 HN 논쟁이 있다.

[Amazon · HN]#LLM#오픈웨이트#AWSdevday ↗GN ↗ 3

문서·이미지에서 구조화된 정보를 뽑아내는 Clairic System One을 오픈 웨이트로 풀었다. 커뮤니티 분석으로는 1080×1920 이미지 1장당 $0.00049로 Mistral OCR보다 약 8배 저렴하다는 계산이 나오며(공식 수치는 아님), 로컬 OCR 파이프라인을 구성하려는 팀에 선택지가 하나 늘었다.

[Cloudflare 블로그 · HN]#오픈웨이트#OCR#Cloudflaredevday ↗

Mistral이 Voxtral Transcribe 3(Small·Mini)와 Realtime 3의 구조와 학습법을 공개했다. 53개 언어를 지원하고 Mini는 분당 $0.003에 최대 60분 오디오를 처리한다. FLEURS 45개 언어 평균 WER은 Small 4.0%, Mini 4.5%이고, Realtime은 480ms 지연에서 경쟁 실시간 모델보다 정확하다고 주장한다.

[Mistral AI]#음성인식#LLMGN ↗ 1

사내 AI 도구 비용 통제를 일일 요청 쿼터(V0) → 개인 월 예산(V1) → 팀 공유 풀과 개인 한도(V2)로 발전시켰고, V2 이후 개인 예산 증액 요청이 85% 줄었다. 서비스 게이트웨이와 지출 승인 서비스로 실시간 통제하고, 28일 롤링 윈도우로 집계하며, 승인 서비스 장애 시에는 fail-open으로 개발을 막지 않는다.

[Pinterest Engineering]#비용최적화#AI도입devday ↗

Copilot Business/Enterprise의 조직별 모델 타깃팅 규칙(프리뷰)이 2027-01-12에 종료된다. 기존 규칙은 자동 마이그레이션되지만 그 전에 모델 설정을 수동으로 옮기고 규칙을 지우는 것이 권장되며, 종료 이후 Enterprise teams 모드를 끄면 모델 접근 복원은 보장되지 않는다. 조직 관리자라면 연말 전에 확인할 항목이다.

[GitHub Changelog]#GitHub#Copilotdevday ↗

금융권이 ISO 27001·ISMS-P 준수를 위해 VDR 대신 NAS를 택하는 이유와, RAID는 가용성 장치일 뿐 랜섬웨어 방어는 btrfs 스냅샷이 맡아야 한다는 점을 정리했다. 4베이는 RAID 5, 6베이 이상에서 RAID 6이 의미 있고, 디스크 가격 상승에도 3년 안팎이면 클라우드 대비 TCO를 회수할 수 있다고 본다. devday 오늘 인기 1위.

[velog · oed]#인프라#보안#국내기술블로그devday ↗

단일 바이너리 + SQLite + OpenBSD httpd 조합으로 프레임워크 없이 웹 앱을 운영한 경험담이다. 요청마다 새 프로세스를 띄우고 pledge/unveil·chroot로 CGI를 샌드박싱해 단순함과 보안을 함께 챙겼다. HN에서는 C의 개발 생산성과 SQLite 동시 쓰기 한계에 대한 반론도 활발했다. devday 오늘 인기 2위.

[prophitt.me · HN]#C#백엔드devday ↗

Boost.Beast 저자 Vinnie Falco는 C++이 밀리는 진짜 이유가 메모리 안전성보다 조합 가능한 라이브러리와 cargo/crates.io 같은 패키지 생태계 부재라고 주장한다. C++20 코루틴과 std::execution(P2300) 표준화 방향을 비판하고, Boost.Capy·Boost.Corosio처럼 지금 쓸 수 있는 라이브러리로 해결하자고 제안한다.

[vinniefalco.com]#C++#패키지관리GN ↗ 3

위험 평가 의무, 테스트·감사, 내장 평가자, 완전 재귀적 자기개선 속도 제한, 프런티어 속도 조절이라는 5가지 입법 원칙을 제시했다. Anthropic은 차기 모델 사전학습을 최소 6주(11월→1월) 미뤘고, 신모델 출시 후 14일간 역량 연구에 쓰지 않는 실험을 시작했다고 밝혔다. HN에서는 자발적 조치는 긍정적이지만 자기 규제만으로는 부족하다는 의견이 많았다.

[darioamodei.com · HN]#AI안전#Anthropicdevday ↗GN ↗ 3

그 외 눈에 띈 글


#오늘의개발뉴스 #보안 #LLM #국내기술블로그 #릴리스 #비용최적화 #오픈웨이트 #AI에이전트 #AI코딩 #Anthropic #개발도구 #백엔드 #양자암호 #음성인식 #인프라 #코드리뷰 #패키지관리 #프론트엔드 #하네스 #AI도입 #AI안전 #AWS #C #C++ #CI/CD #Cloudflare #Copilot #CVE #GitHub #Linux #Next.js #OCR #Python #Rust

 

 

 

 

 

 

 

 

 

 

반응형
반응형

 

지정 폴더안의 이미지 전부  텍스트 추출하기

# 파이썬 컴파일 경로가 달라서 현재 폴더의 이미지를 호출하지 못할때 작업디렉토리를 변경한다. 
import os
from pathlib import Path
# src 상위 폴더를 실행폴더로 지정하려고 한다.
###real_path = Path(__file__).parent.parent
real_path = Path(__file__).parent
print(real_path)
#작업 디렉토리 변경
os.chdir(real_path) 

"""_summary_
pip install pillow
pip install pytesseract



다운 받아야하는 학습된 한글 데이터 파일명: kor.traineddata
파일 위치: tesseract가 설치된 경로 C:\Program Files\Tesseract-OCR\tessdata

"""



from PIL import Image
import pytesseract  
import cv2 
import matplotlib.pyplot as plt

pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'
config = ('-l kor+eng --oem 3 --psm 11')
#config = ('-l kor+eng')
directory_base = str(real_path)+"./img/"  # 경로object를 문자열로 변경해서 합친다. 

        
# Open an image file
image_path = directory_base+"03_kor_eng.png"  # Replace with your image file path
img = Image.open(image_path)

# Use Tesseract to extract text
text = pytesseract.image_to_string(img, config=config)

print("Extracted Text:" + text)

image = cv2.imread(image_path)
rgb_image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)

plt.imshow(rgb_image)

# use Tesseract to OCR the image 
# text = pytesseract.image_to_string(rgb_image, lang='kor+eng')
text = pytesseract.image_to_string(rgb_image, config=config)
print(text)


if __name__ == "__main__":
     
    # List all files in the directory
    file_list = [f for f in os.listdir(directory_base) if os.path.isfile(os.path.join(directory_base, f))]

    # Print the list of files
    for file in file_list:
        print(file)
        # Open an image file
        image_path = directory_base + file  # Replace with your image file path
        img = Image.open(image_path)

        text = pytesseract.image_to_string(img, config=config)
        print("Extracted Text:")
        print(text)

[python] 이미지에서 텍스트 추출하기,  tesseract, OCR

 

 

반응형
반응형

pip install pytesseract

 

한글팩 : https://github.com/tesseract-ocr/tessdata/

 
다운 받아야하는 학습된 한글 데이터 파일명: kor.traineddata
파일 위치: tesseract가 설치된 경로 C:\Program Files\Tesseract-OCR\tessdata
 

*** 설치 할때 언어팩 선택 

 

pytesseract 0.3.10

 

Python-tesseract is an optical character recognition (OCR) tool for python. That is, it will recognize and “read” the text embedded in images.

Python-tesseract is a wrapper for Google’s Tesseract-OCR Engine. It is also useful as a stand-alone invocation script to tesseract, as it can read all image types supported by the Pillow and Leptonica imaging libraries, including jpeg, png, gif, bmp, tiff, and others. Additionally, if used as a script, Python-tesseract will print the recognized text instead of writing it to a file.

USAGE

Quickstart

Note: Test images are located in the tests/data folder of the Git repo.

Library usage:

from PIL import Image

import pytesseract

# If you don't have tesseract executable in your PATH, include the following:
pytesseract.pytesseract.tesseract_cmd = r'<full_path_to_your_tesseract_executable>'
# Example tesseract_cmd = r'C:\Program Files (x86)\Tesseract-OCR\tesseract'

# Simple image to string
print(pytesseract.image_to_string(Image.open('test.png')))

# In order to bypass the image conversions of pytesseract, just use relative or absolute image path
# NOTE: In this case you should provide tesseract supported images or tesseract will return error
print(pytesseract.image_to_string('test.png'))

# List of available languages
print(pytesseract.get_languages(config=''))

# French text image to string
print(pytesseract.image_to_string(Image.open('test-european.jpg'), lang='fra'))

# Batch processing with a single file containing the list of multiple image file paths
print(pytesseract.image_to_string('images.txt'))

# Timeout/terminate the tesseract job after a period of time
try:
    print(pytesseract.image_to_string('test.jpg', timeout=2)) # Timeout after 2 seconds
    print(pytesseract.image_to_string('test.jpg', timeout=0.5)) # Timeout after half a second
except RuntimeError as timeout_error:
    # Tesseract processing is terminated
    pass

# Get bounding box estimates
print(pytesseract.image_to_boxes(Image.open('test.png')))

# Get verbose data including boxes, confidences, line and page numbers
print(pytesseract.image_to_data(Image.open('test.png')))

# Get information about orientation and script detection
print(pytesseract.image_to_osd(Image.open('test.png')))

# Get a searchable PDF
pdf = pytesseract.image_to_pdf_or_hocr('test.png', extension='pdf')
with open('test.pdf', 'w+b') as f:
    f.write(pdf) # pdf type is bytes by default

# Get HOCR output
hocr = pytesseract.image_to_pdf_or_hocr('test.png', extension='hocr')

# Get ALTO XML output
xml = pytesseract.image_to_alto_xml('test.png')

Support for OpenCV image/NumPy array objects

import cv2

img_cv = cv2.imread(r'/<path_to_image>/digits.png')

# By default OpenCV stores images in BGR format and since pytesseract assumes RGB format,
# we need to convert from BGR to RGB format/mode:
img_rgb = cv2.cvtColor(img_cv, cv2.COLOR_BGR2RGB)
print(pytesseract.image_to_string(img_rgb))
# OR
img_rgb = Image.frombytes('RGB', img_cv.shape[:2], img_cv, 'raw', 'BGR', 0, 0)
print(pytesseract.image_to_string(img_rgb))

If you need custom configuration like oem/psm, use the config keyword.

# Example of adding any additional options
custom_oem_psm_config = r'--oem 3 --psm 6'
pytesseract.image_to_string(image, config=custom_oem_psm_config)

# Example of using pre-defined tesseract config file with options
cfg_filename = 'words'
pytesseract.run_and_get_output(image, extension='txt', config=cfg_filename)

Add the following config, if you have tessdata error like: “Error opening data file…”

# Example config: r'--tessdata-dir "C:\Program Files (x86)\Tesseract-OCR\tessdata"'
# It's important to add double quotes around the dir path.
tessdata_dir_config = r'--tessdata-dir "<replace_with_your_tessdata_dir_path>"'
pytesseract.image_to_string(image, lang='chi_sim', config=tessdata_dir_config)

Functions

  • get_languages Returns all currently supported languages by Tesseract OCR.
  • get_tesseract_version Returns the Tesseract version installed in the system.
  • image_to_string Returns unmodified output as string from Tesseract OCR processing
  • image_to_boxes Returns result containing recognized characters and their box boundaries
  • image_to_data Returns result containing box boundaries, confidences, and other information. Requires Tesseract 3.05+. For more information, please check the Tesseract TSV documentation
  • image_to_osd Returns result containing information about orientation and script detection.
  • image_to_alto_xml Returns result in the form of Tesseract’s ALTO XML format.
  • run_and_get_output Returns the raw output from Tesseract OCR. Gives a bit more control over the parameters that are sent to tesseract.

Parameters

image_to_data(image, lang=None, config='', nice=0, output_type=Output.STRING, timeout=0, pandas_config=None)

  • image Object or String - PIL Image/NumPy array or file path of the image to be processed by Tesseract. If you pass object instead of file path, pytesseract will implicitly convert the image to RGB mode.
  • lang String - Tesseract language code string. Defaults to eng if not specified! Example for multiple languages: lang='eng+fra'
  • config String - Any additional custom configuration flags that are not available via the pytesseract function. For example: config='--psm 6'
  • nice Integer - modifies the processor priority for the Tesseract run. Not supported on Windows. Nice adjusts the niceness of unix-like processes.
  • output_type Class attribute - specifies the type of the output, defaults to string. For the full list of all supported types, please check the definition of pytesseract.Output class.
  • timeout Integer or Float - duration in seconds for the OCR processing, after which, pytesseract will terminate and raise RuntimeError.
  • pandas_config Dict - only for the Output.DATAFRAME type. Dictionary with custom arguments for pandas.read_csv. Allows you to customize the output of image_to_data.

CLI usage:

pytesseract [-l lang] image_file

INSTALLATION

Prerequisites:

  • Python-tesseract requires Python 3.6+
  • You will need the Python Imaging Library (PIL) (or the Pillow fork). Under Debian/Ubuntu, this is the package python-imaging or python3-imaging.
  • Install Google Tesseract OCR (additional info how to install the engine on Linux, Mac OSX and Windows). You must be able to invoke the tesseract command as tesseract. If this isn’t the case, for example because tesseract isn’t in your PATH, you will have to change the “tesseract_cmd” variable pytesseract.pytesseract.tesseract_cmd. Under Debian/Ubuntu you can use the package tesseract-ocr. For Mac OS users. please install homebrew package tesseract.
  • Note: In some rare cases, you might need to additionally install tessconfigs and configs from tesseract-ocr/tessconfigs if the OS specific package doesn’t include them.
Installing via pip:

Check the pytesseract package page for more information.

pip install pytesseract
Or if you have git installed:
pip install -U git+https://github.com/madmaze/pytesseract.git
Installing from source:
git clone https://github.com/madmaze/pytesseract.git
cd pytesseract && pip install -U .
Install with conda (via conda-forge):
conda install -c conda-forge pytesseract

TESTING

To run this project’s test suite, install and run tox. Ensure that you have tesseract installed and in your PATH.

pip install tox
tox

반응형
반응형

바풀, 세계 최초 ‘자동답변’ 에듀테크 기술 개발 2016-09-26


http://news.naver.com/main/read.nhn?mode=LSD&mid=sec&sid1=101&oid=014&aid=0003711273


에듀테크 시대 새로운 공부문화를 창조하는 ㈜바풀은 전 세계 최초로 사진 속 수학문제를 인식해 같은 문제와 유사 문제를 찾아 풀이와 답변을 제공하는 ‘자동답변’ 기술을 개발했다고 26일 밝혔다. 


㈜바풀은 바로풀기 서비스를 통해 모르는 문제가 생기면 스마트폰으로 사진을 찍어 질문하고 답변 받는 무료 공부 Q&A서비스를 운영 중이다. 이번에 개발한 ‘자동답변’ 에듀테크 기술은 지난 6년 간 바로풀기 서비스를 통해 구축한 400만 개 가운데 답변이 달린 100만 개의 DB를 검토하여 똑같은 질문을 찾아서 풀이와 답변을 보여주는 기술이다. 

똑같은 질문이 없을 경우, 수학문제의 수식과 텍스트(한국·영어)를 인식해서 유사한 질문의 답변을 제공하는 방식으로 문제풀이를 도와준다. 

세계 최초로 개발한 ‘자동답변’ 기술은 세 가지 기술이 융합되어 얻어진 결과다. 

먼저 ‘사진 후처리 기술’은 사용자가 촬영한 수학 문제로부터 각종 노이즈를 제거하고, 회전각과 비틀림 각을 보정해 문제 사진이 수평이 되도록 만든다.

이렇게 보정된 사진은 20여 단계로 구성된 독자적인 OCR(OpticalCharacter Reader/Recognition, 광학적 문자 판독) 기술을 통해 사진 속의 텍스트와 수식을 분리하고 이를 메타 정보로 기록한다. 

마지막으로 6년간의 서비스에서 얻어진 각 학년별 수학 단원 및 개념 맵을 활용함으로써 DB로부터 해당 문제의 답변, 그리고 사용자에게 도움이 될 수 있는 유사 문제를 제공한다. 

지금까지의 OCR기술은 한글보다 상대적으로 쉬운 언어인 영문 환경에 한해서만 그 기능을 수행할 수 있었고, 수학 문제에서는 수식으로만 이루어진 간단한 계산문제에 대해서만 풀이를 제공하는 수준이었으나, ㈜바풀은 세계 최초로 한글과 수식이 혼합된 환경에서도 그 둘을 각각 분리하여 사진 형태의 문제를 분석해 3초 정도의 시간이면 답변을 찾아준다. 

㈜바풀의 ‘자동 답변’기술을 통해 얻어진 학생의 정보는 ‘KnowledgeTracing’이 가능하며, 학생의 학습이력 관리 및 수준에 맞는 맞춤 강의와 선생님을 추천할 수 있다. 또한, 문제를 바탕으로 메타 콘셉트 데이터를 구축해서 문제 하나가 갖고 있는 여러 개념들을 묶어주고 분류할 수 있게 되어 학생들에게 유용한 정보를 제공할 수 있게 된다. 

바풀 김영재 CTO는 “바풀의 ‘자동답변’ 신기술을 통해 많은 학생들이 수학을 포기하지 않고 공부에 대한 재미를 느꼈으면 좋겠다”며 “㈜바풀은 교육과 IT를 접목한 에듀테크 신기술로 모든 학생들이 동등한 교육환경 속에서 양질의 교육을 경험할 수 있도록 노력하겠다”고 전했다. 

반응형

+ Recent posts