You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
config 를 우선적으로 config.yaml 파일을 통해 불러옵니다. call_ocr_api 는 config 파라미터를 받아 이미지의 path 를 알아낸 후 ocr 의 response 값을 줍니다.
ocr_api
파라미터 중에 custom_path 가 있습니다. 이는 bytes 형태로 변경된 이미지가 있을 경우 img path 를 바이트 그 자체로 설정합니다.
그래서 지금 main.py 를 보면 이미지 전처리를 거친 이미지는 bytes 로 변환되는데 그 경우 custom_path 에 할당됩니다.
Goals
저희의 최종 목표는 사용자가 찍은 사진을 byte 형태로 받아 이미지 저장없이 OCR API 에 넣는 것입니다. 추후 코드는 yaml 에서 path 기반이 아닌 들어온 바이트 그 자체를 넘겨줘야 해서 그 방향대로 코드를 바꿀 겁니다.
코드 흐름 설명
중점적으로 볼 파일
main.py
util/ocr_api.py
main
config 를 우선적으로
config.yaml
파일을 통해 불러옵니다.call_ocr_api
는config
파라미터를 받아 이미지의 path 를 알아낸 후 ocr 의 response 값을 줍니다.ocr_api
파라미터 중에
custom_path
가 있습니다. 이는 bytes 형태로 변경된 이미지가 있을 경우img path
를 바이트 그 자체로 설정합니다.그래서 지금
main.py
를 보면 이미지 전처리를 거친 이미지는 bytes 로 변환되는데 그 경우custom_path
에 할당됩니다.Goals
저희의 최종 목표는 사용자가 찍은 사진을 byte 형태로 받아 이미지 저장없이 OCR API 에 넣는 것입니다. 추후 코드는 yaml 에서 path 기반이 아닌 들어온 바이트 그 자체를 넘겨줘야 해서 그 방향대로 코드를 바꿀 겁니다.
The text was updated successfully, but these errors were encountered: