Skip to content

Release notes

2.0.4

  • 2023/04/14
  • [기능 추가]
    • InferenceHandler.infer_and_postprocess 결과에 이미지가 oversized 인지 여부를 나타내는 is_oversized 추가 (bool)
  • [기능 변경]
    • pytorch 버전 2.0.0 으로 변경
    • polygon sort 하는 구현 변경
      • 옵션에 따라 다르게 수행하나, api 에서는 변경 불가능 (default "sorting")
  • [Bug Fix]
    • recognition 학습 시 class_index 가 없는 경우 에러가 뜨는 현상 해결

2.0.3

  • 2023/04/12
  • [기능 추가]
    • detection, recognition의 inference option 잘못 기입시 에러 호출
  • [기능 변경]
    • test_api.py 코드로 생성된 모델로도 전부 읽을수 있도록 sample 데이터를 더 간단한 이미지로 변경.
    • 기획에 맞춰 변수 이름 변경 및 구조 수정
      • detection_batch_size 삭제, recognition_batch_size -> batch_size
      • max_num_of_predictions -> max_num_of_text_polygons
      • inference options 변수명 수정
      • inferencer output 변수명 및 구조 수정
      • regex -> text_formatting
        • regex 에 kor, symbol 그룹 추가
        • recognition trainer build 시 regex(text_formatting) 지정하는 부분 삭제
    • 이미지 preprocess 속도 개선
      • ImageLoader 에서 기본 로드 타입을 numpy.ndarray 로 변경
      • resize/roi/cropper 등에서 image를 PIL.Image.Image 만 입력받던 부분을 numpy.ndarray도 받도록 변경
  • [Bug Fix]
    • inferencer 생성 시 inspection size 가 변경 안되는 문제 해결
    • inferencer 문서에 params 옵션들 문구 수정
    • inferencer 생성 시 warmup 을 여러번 수행하는 문제 해결
      • 해당 과정에서 생길 수 있는 버그 해결
    • Recognition postprocess 가 비정상적으로 오래 걸리는 문제 해결
      • text formatting의 mask array가 매번 재생성 되는 문제 해결

2.0.2

  • 2023/04/06
  • [기능 변경]
    • Perspective Transform 의 변수를 백분율 integer 로 수정
    • fast model 추가 학습 후 database에 업데이트 완료
    • Augmentation 지원 리스트 수정
      • v-flip / h-flip 제거
      • recognition 에서 rotate, perspective_transform 제거
  • [Bug Fix]
    • ocr example 컨피그를 최신 버전에 맞게 수정
    • 인퍼런스 시 특정 이미지 사이즈에서 GPU 메모리 증가하는 이슈 일부 해결 (최대 2MB 까지는 증가할 수 있음)

2.0.1

  • 2023/04/03
  • [기능 추가]
    • max_number_of_predictions 기능 추가.
      • 검사 시간의 최대값에 대한 보장을 위해 최대 검출 폴리곤 수의 제한 기능
      • 이 때 detection 과 recognition 의 postprocess 호출 수가 동일하다는 보장이 깨짐
      • timer 에서 detection, recognition 의 postprocess 호출 수 체크 제거
    • InferenceHandlerparams.oversized_image_handling 옵션 추가: do_not_inspect, resize_to_fit
    • recognition fast 모델 추가
  • [기능 변경]
    • SaigeToolkit의 import 시간 단축
      • pretrainedmodel 패키지를 실제로 사용될 때에만 import 하도록 수정
    • InferenceHandler.to_device() 호출 시 warmup 수행
    • Validation 시에도 inspection_size_wh 적용
      • Trainer.train_one_step() 첫 호출 시 validation 일부 수행해 gpu memory 체크
  • [Bug Fix]
    • Windows에서 Trainer.buildnum_workers=0 사용하는 경우 발생하는 에러 해결
    • Windows에서 num_workers > 0 사용하는 경우 발생하는 에러 해결 (validation worker=0 으로 변경)
    • to_device 호출 시 warmup 실행
      • inferencer build 시 to_device 가 호출되는데, 이로 인해 warmup 이 2번 실행되는 현상 수정

2.0.0

  • network_type
    • UI 상 이름에 맞게 변수명 수정 (model -> network_type)
  • post train process
    • 학습 과정에서 학습된 inference option 이 있다면 return 해주는 기능
    • IAD 에서만 필요한 method 이나, Seg2 에도 구현되어있으며, 이에 따라 OCR 에도 적용
  • persistent_worker & prefetch_factor
    • 이미지가 적은 경우 학습이 진행되지 않는 이슈 및
    • 데이터 로더 iteration 이 끝나고 새로 시작될떄 windows 상에서 딜레이가 길어지는 것을 방지하기 위함
  • Move revert resize & roi into SaigeToolkit
    • 기존 inference 의 encode_output 에 코딩되었던
    • resize, roi 를 revert 하는 기능을 SaigeToolkit 으로 이동
    • 이에 따라 resize, roi 를 forward 하는 기능도 같은 함수로 통일
    • 변경점을 해당 레포에 적용
  • add 16bit image sample
    • 16 비트, gray scale 이미지 샘플을 추가하고 test 코드에 추가
  • dataset List -> Dict
    • API 에서 input 으로 넣어주는 data image list -> Dict 타입으로 변경
  • inference timer
    • SaigeToolkit 의 timer 를 ocr output 에 맞게 수정.
    • det_rec_kie inferencer 에서만 kie time 출력
    • 출력 형식은 아래와 같음
      "time": {
          "imread_time": float,
          "inference_time": float,
          "detection_inference_time": float,
          "recognition_inference_time": float,
          "detection_post_processing_time": float,
          "recognition_post_processing_time": float,
      }
      
  • warm-up api
    • inspection_size_wh 개념 도입
    • rec_batch size, det_batch_size(==1) 도입
  • Augmentation 수정
    • Seg2 개발 중 업데이트 된 augmentation 사용 가능 목록 반영
  • Label feasibility checker API
    • ocr 학습에 사용하기 부적합한 "잘못된 라벨링"을 검토하는 API
    • 데모 제공
  • Setup code 수정
    • 메인 페이지 (Getting started) 의 setup 및 test 코드가 vision2 에 해당하는 API 에 대해서만 작동하도록 수정
    • 이에 따라 cythonize setup 대상 파일도 ocr 레포 전체에서 vision2 에 해당하는 기능들로 한정되었음
      • cythonize target 파일을 약 260개에서 220개로, 약 40개 파일 제거
  • 한글 character set 변경
    • KSC 6501 + [멊, 챂, 캪, 핟, 쌰, 쓔] (CJ OCR 솔루션 개발당시 발견한 문자 6개)
    • 위 변경 사항에 따른 pretrained 모델 수정

0.7.1

  • Submodule: Update SaigeToolkit
    • Ocr cropper 에서 width = 0 인 패치를 crop 하지 않도록 수정
  • Augmetation
    • user input 으로 들어오는 config 가 SaigeToolkit 의 augmentation 에 구현된 것과 미세하게 다름
    • 이 부분 호환시켜주는 코드를 SaigeSegmentation2 레포로부터 가져옴
    • 이에 따른 pytest 테스트코드 업데이트
  • OcrDataset
    • 사소한 오류 수정
  • Checkpoint
    • 이전 버전에서 저장된 detection checkpoint 사용할 수 있도록 호환
  • Inferencer Dataloader 수정
    • update 해준 analyze 용 데이터가 pop() 함수로 인해 사라지는 문제 해결

0.7.0

  • Submodule: Update SaigeToolkit
    • Perspective Augmentation 추가
    • Geometric Augmentation의 경우, Polygon 연산 추가
    • Box Rotation Augmentation 단순화 + 속도 개선

0.6.1

  • Fix: numpy handle
    • numpy input 을 handle 하는 방법이 SaigeToolkit 과 다른 부분 수정

0.6.0

  • Feature: warmup in inferencer
    • 동규님 요청에 따른 inference engine 의 warmup 단계 추가
  • SaigeSegmentation2 version 2.0.0-rc2 의 변경점 적용.
    • 체크포인트 구조 및 Inference API 변경
  • Fix: demo files
    • 상기 변경점에 따른 demo/*.py 파일 수정
  • Test: update test code
    • 상기 변경점에 따른 test/test_api.py 파일 수정
  • Feature: mkdocs 적용