생성형AI가 만드는 이미지 퀄리티가 빠르게 개선되고 있다는 점은 지난 글들에서 말씀을 많이 드렸는데요. 인공지능이 내 얼굴로 만들어준 사진들 한의학 X 루이비통 콜라보...jpg 인공지능이 그려준 공진단...jpg 그렇다면 우리가 주로 많이 사용할만한 의료용 이미지에서는 어떨지 한번 테스트를 해봤습니다. 메디컬 파트에서의 이미지 생성에 대해서는 여러가지 측면에서 관심을 가지고 연구되고 있는 데요. 그 가운데 하나가 교육적 목적의 메디컬 포토 사진입니다. 환자 케이스 사진을 그대로 교과서나 논문에 실는 것에 있어서의 개인정보 등 문제가 있기 때문에생성형 이미지를 활용하면 어떻겠나 하는 관점에서 접근하고 있습니다. 아래는 관련해 몇 가지 연구를 찾아봤습니다. Utilizing GPT-4 and generative artificial intelligence platforms for surgical education: an experimental study on skin ulcershttps://link.springer.com/article/10.1007/s00238-024-02162-9 배경인공지능(AI), 특히 생성적 적대 신경망(GAN)의 발전은 의학 교육 향상에 흥미로운 가능성을 제시하며 이미지 생성 기능이 관심의 대상이 되고 있습니다. 이 새로운 연구는 수술에 대한 교육 자료를 풍부하게 하기 위해 대규모 언어 모델인 ChatGPT와 GAN인 DALL-E 2, Midjourney 및 Blue Willow를 결합하여 실제 궤양 이미지를 생성하는 데 있어 그 적성을 평가합니다.방법먼저 ChatGPT-4에 다양한 피부 궤양의 정의를 묻는 메시지를 표시하고 그 응답을 GAN 모델에 입력했습니다. 생성된 AI 이미지는 보드 인증을 받은 성형외과 전문의 4명과 풍부한 경험을 가진 성형외과 레지던트 3명이 리커트 척도를 사용하여 평가했습니다.결과 세 가지 GAN 중 DALL-E만이 각 궤양 유형의 고유한 특징을 잘 묘사하여 허용 가능한 수준의 정확도를 보였습니다. 그러나 진위 여부와 교육적 가치 측면에서 기존 환자 사진을 대체할 수는 없습니다. 미드저니와 블루 윌로는 미학적으로 만족스러운 이미지를 제공하지만 임상 교육에 적합하지 않은 고도로 양식화되고 과장된 특징을 만들어 냈습니다.결론 이러한 단점에도 불구하고, 기술의 지속적인 발전을 고려할 때 전통적인 의학 교육 방법론을 보완하는 데 있어 AI 생성 이미지의 미래는 여전히 유망합니다.
The Promise and Pitfalls of AI-Generated Anatomical Images: Evaluating Midjourney for Aesthetic Surgery Applicationshttps://link.springer.com/article/10.1007/s00266-023-03826-w 배경 미드저니와 같은 생성형 인공지능(AI) 시스템의 급속한 발전으로 컴퓨터로 생성된 이미지가 의료 훈련에 활용될 수 있는 길이 열렸습니다. 그러나 이러한 이미지가 의료 상담용이 아니라는 점을 분명히 밝혔음에도 불구하고 그 정확성과 사실성은 아직 철저히 검증되지 않았습니다.방법적절한 전신 해부학적 구조를 묘사하고 미용 성형 수술을 표현하는 데 중점을 두고 유명한 인공 지능 생성 애플리케이션인 Midjourney AI 툴에 일련의 요청을 보냈습니다. 그 후 해부학 및 미용 수술 분야에서 다년간의 경험을 가진 4명의 전문가로 구성된 블라인드 패널이 정확성, 해부학적 정확성, 시각적 효과라는 세 가지 파라미터를 기준으로 이미지를 평가했습니다. 각 매개변수는 1~5점 척도로 점수를 매겼습니다.결과 Midjourney에서 제작한 모든 이미지는 상당한 부정확성을 보였으며 해부학적 표현이 정확하지 않았습니다. 시각적 효과는 높았지만 의료 교육 및 과학 출판물에는 부적합한 것으로 나타났습니다.결론 이러한 조사 결과가 시사하는 바는 여러 가지입니다. 우선, 이미지의 부정확성으로 인해 교육에 효과적이지 않아 잠재적인 오해를 불러일으킬 수 있습니다.
또한 해부학적으로 정확하지 않기 때문에 과학 논문에서의 적용 가능성도 제한됩니다. 이 연구는 단일 AI 도구에 초점을 맞추고 있지만, AI 개발자와 의료 전문가 간의 협업이 필요하다는 점을 강조합니다. 정확한 의료 데이터베이스의 잠재적 통합은 향후 이러한 AI 도구의 정밀도를 개선할 수 있습니다. 위 연구 두개 모두 2024년 1월에 나온 연구이고요. 달리가 그나마 정확해보이는 이미지를 생성을 한다고 하고,미드저니의 경우에는 미학적이지만 교육적으로 사용할 정도로 정확한 이미지를 만들지는 못한다고 합니다.
물론 이런 부분들은 앞으로는 개선될 여지가 있겠죠. 제 개인적인 경험으로도 미드저니를 통한 이미지 생성은 미학적으로 완성도가 매우 높습니다. 단순한 단어만 입력해도 그걸 가지고 창의적이고 아름다운 이미지 형태로 완성시켜줍니다. 가령,x-ray of love 만 미드저니에 입력해도 다음과 같은 그림을 만들어줍니다 x-ray of love 추상적인 단어나 생뚱맞은 조합에 대해서도 나름의 상상을 더해서 마감도가 높은 이미지를 산출해내는거죠. 지나치게 상상력이 좋달까요.예술가 성향이 강한것이죠. 그러다보니 정확도와 엄밀함이 요구되는 메디컬 이미지의 생성에서는오히려 낮은 점수를 줄 수 밖에 없는 결과가 나왔을 것 같습니다. 일반적으로 미드저니용 프롬프트를 만드는데 gpt를 사용을 많이 하는데요. 요새는 잘 튜닝된 gpts 들도 공개되어 있어서그런걸 사용하면 조금 간편하게 이미지생성을 위함 프롬프트를 뽑아낼 수 있습니다. 요새 많은 사람들이 사용하는게 위의 미드저니 프롬프트 제네레이터 이고요. ロMidjourneyロ -- MJ Prompt Generator (V6)https://chat.openai.com/g/g-tc0eHXdgb-romidjourneyro-mj-prompt-generator-v6 아래와 같이 요청을 해봤습니다. 위와 같이 내가 원하는 내용을 대충 적으면내가 원하는 이미지를 생성할 수 있도록 미드저니에 최적화된 형태로 프롬프트를 만들어줍니다. 만들어준 프롬프트를 사용해서 출력을 해보면요. /imagine prompt: A close-up portrait of a person with subtle signs of hyperthyroidism, showing widened eyes and a slightly startled expression, set in a serene park on a sunny day. The natural light highlights the unique facial features while casting soft shadows, adding depth to the image. Created Using: high-resolution digital camera, natural sunlight, soft focus lens, slight HDR effect, real-life portrait photography, attention to detail in facial expressions, respectful portrayal of medical conditions, hd quality, natural look --ar 1:1 --v 6.0 /imagine prompt: A photograph of a person with hyperthyroidism, captured during a moment of contemplation, showcasing widened eyes and a gentle, anxious expression.
The indoor setting is softly lit by ambient light from a nearby window, creating a calm, introspective atmosphere. Created Using: DSLR camera, natural indoor lighting, shallow depth of field, high definition, emotional depth, respectful representation of individuals, real-life scenario, hd quality, natural look --ar 4:5 --v 6.0 미드저니 프롬프트 제네레이터를 사용해 생성한 이미지들은 우리가 기대했던 스타일은 아니라는 점을 알 수 있죠. 역시나, 미학적인 완성도는 높지만 우리 목적에 부합하지 않는 상태입니다. 의학적 목적으로 사용하려면,장황한 설명보다는, 명확한 범위를 설정함으로써구조화된 프롬프트로 형식을 제약해서 사용하는게 좋다고 생각을 합니다. 즉, 의도적으로 상상력에 제약을 가함으로써형식을 제한하고 가급적 우리가 원하는 목적에 맞는 이미지를 산출하도록 하는 과정이 필요합니다. 이러한 목적을 달성하기 위해 인풋-아웃풋의 반복함으로써,원하는 아웃풋을 안정적으로 산출하는 프롬프트를 찾아가는 과정이 일종의 프롬프트 엔지니어링이라고 볼 수 있을겁니다. 아래는 그런 내용을 담아 제가 엔지니어링한 프롬프트입니다.Generate Midjourney prompt for [topic]: [topic], [descriptive phrase], [image type], [reference item], style by [reference book/medical atlas name][topic]: Enter the disease, condition, or medical topic you want to generate, in English[descriptive phrase]: Add a brief phrase to provide more context or specific details about the topic, if necessary. Keep it concise and relevant. (Optional) Examples: "advanced stage" "with complications" "during physical examination" "under microscope" "on CT scan" "intraoperative view" "in elderly patient" "close-up view" "histopathology slide" "schematic representation"[image type]: Specify either "photo" or "medical illustration" [reference item]: Choose from the list provided in the previous message or add a specific reference item relevant to the topic [reference book/medical atlas name]: Provide the title of a relevant medical reference book or atlas from the list provided in the previous message or add another reputable sourcePhoto reference item examples:clinical presentation gross specimen microscopic finding radiologic imaging (X-ray, CT, MRI, ultrasound) endoscopic view (gastrointestinal endoscopy, bronchoscopy, cystoscopy) surgical procedure physical examination finding diagnostic test result intraoperative view dermatoscopic finding ophthalmoscopic finding angiographic imaging pathological finding autopsy finding Illustration reference item examples:anatomical diagram pathophysiological process diagnostic algorithm treatment flowchart drug mechanism of action disease progression stages surgical technique medical device structure molecular pathway histological structure cross-sectional anatomy functional anatomy embryological development rehabilitation exercise acupuncture point locationReference book/atlas list: Dermatology:Fitzpatrick's Color Atlas and Synopsis of Clinical Dermatology Andrews' Diseases of the Skin Dermatology (Bolognia) Internal Medicine:Harrison's Principles of Internal Medicine Cecil Essentials of Medicine Current Medical Diagnosis & Treatment (CMDT) Surgery:Schwartz's Principles of Surgery Sabiston Textbook of Surgery Bailey & Love's Short Practice of Surgery Pediatrics:Nelson Textbook of Pediatrics Rudolph's Pediatrics Harriet Lane Handbook Obstetrics & Gynecology:Williams Obstetrics Comprehensive Gynecology (Lobo) Danforth's Obstetrics and Gynecology Neurology:Adams and Victor's Principles of Neurology Merritt's Neurology Neuroscience (Purves) Radiology:Felson's Principles of Chest Roentgenology Fundamentals of Diagnostic Radiology (Brant) Diagnostic Imaging (Armstrong) Other Specialties:Robbins & Cotran Pathologic Basis of Disease Gray's Anatomy for Students Netters' Atlas of Human Anatomy Katzung & Trevor's Pharmacology Junqueira's Basic Histology Guyton and Hall Textbook of Medical Physiology Mandell, Douglas, and Bennett's Principles and Practice of Infectious DiseasesOutput format: The assistant will return a concise Midjourney prompt in the following format, without any additional explanations or context: /imagine prompt: [topic], [descriptive phrase], [image type], [reference item], style by [reference book/medical atlas name] --ar [aspect ratio]The output will start with "/imagine prompt: " to directly apply the prompt to Midjourney The aspect ratio (--ar) will be flexibly determined based on the characteristics of the image, such as 16:9, 4:3, 1:1, 9:16, etc., to best suit the topic and reference item 결과물의 형태는 항상 아래 형식으로 리턴되도록 하고요. /imagine prompt: [topic], [descriptive phrase], [image type], [reference item], style by [reference book/medical atlas name] --ar [aspect ratio] 너무 상상력이 강하지 않도록 레퍼런스의 범위를 설정하는 방식입니다.
이 프롬프트로 출력해본 이미지들을 보시면 갑상선기능항진증Hyperthyroid patient with eye protrusion, full face shot, clinical presentation, photo style by Harrison's Principles of Internal Medicine --ar 1:1 헬퍼T셀Function of helper T cell, graphical representation, medical illustration style by Junqueira's Basic Histology --ar 4:3 불면증 50대 남성Insomnia with frequent waking up in the middle of the night in a Korean male in his 50s, schematic representation, medical illustration style by Guyton and Hall Textbook of Medical Physiology --ar 16:9 안구를 침범한 대상포진, 40대 여성Facial herpes zoster with eye involvement in a Korean woman in her 40s, clinical presentation, photo style by Fitzpatrick's Color Atlas and Synopsis of Clinical Dermatology --ar 4:3 등 부위 장미색비강진Pityriasis rosea back area, korean, photo, clinical presentation, style by Dermatology (Bolognia) 아토피 어린이atopic dermatitis in korean baby, style by Fitzpatrick's Color Atlas and Synopsis of Clinical Dermatology 여전히 정확도나 엄밀성 부분에서 부족함이 있지만우리가 그래도 예상하는 범주내에서 제한된 형식의 이미지를 생성하고 있음을 볼 수 있습니다. 사용에 참고하시기 바랍니다.