-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feedback #1
base: feedback
Are you sure you want to change the base?
Feedback #1
Conversation
- Add wandb experiment name configuration via parser - Implement class-wise loss and dice metric logging - Add worst samples visualization in Media tab Related to #8
✨ Feat : Enhance wandb functionality
Feat 10/GitHub
[ADD] streamlit connect
[ADD] Streamlit connect output
[ADD] TTA option with inference
Yolo train/inference
[Feat] Docker, Gradio
return parser.parse_args() | ||
|
||
|
||
def roi_extraction(model, data_loader, thr=0.5, input_path = '', x_off = 50, y_off = 40): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
각 function이 무슨 역할 하는지 설명이 있으면 좋을 것 같다.
|
||
for output, image_name in zip(outputs, image_names): | ||
for c, segm in enumerate(output): | ||
if IND2CLASS[c] in ['Trapezium', 'Trapezoid', 'Capitate', 'Hamate', 'Scaphoid', 'Lunate', 'Triquetrum', 'Pisiform']: # 손목 뼈 클래스 bbox 추출 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
손목 뼈 클래스 리스트와 같이 보통 이런 반복되는 정보는 for 문 밖에 따로 리스트 정의해서 불러오는 것이 안전하다.
max_x = max_x + x_off | ||
max_y = max_y + y_off | ||
|
||
# Bounding Box 부분 그리기 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
주석처리한 것은 상황에 따라 사용되어져야 하는 게 아니면 지우고 업로드 하는 게 완성도가 높다.
def main(): | ||
args = parse_args() | ||
|
||
# YOLO 모델 사용 시 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
모델이 없을 경우 에러가 레이즈되어 전체 코드가 잘돌아가도록 Error Handling을 하면 좋을 것 같다. 예를 들어,
if not os.path.exists(args.model_path):
raise FileNotFoundError(f"Model file not found at {args.model_path)
|
||
return rles, filename_and_class | ||
|
||
def load_model(model_path, num_classes=29): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기도 모델로딩 파트와 state_dict 키 관련 파트로 나눌 수 있음.
return parser.parse_args() | ||
|
||
@dataclass | ||
class EnsembleConfig: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기에 output_dir, output_path가 없어서 아래에 정의한 check_paths에서 항상 error가 뜰텐데, 일부러 그런 것인지 아니면 다른 스크립트에 있어서 생략한 것인지.. 후자라면 EnsembleConfig에 추가하는 것이 좋을 것 같음.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
현재 unet3plus.py 스크립트가 effnet, maxvit, resnet에 따라 각각 업로드 되어 있는데, 다른 unet based 모델과 파일명 다르게 하여 혼동 피하는 것을 추천.
|
||
from utils.weight_init import weight_init | ||
|
||
def autopad(k, p=None): # kernel, padding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autopad function이 이 스크립트에서 사용되지 않는데, automatic padding을 위해 정의했다면 사용되어지도록 하거나 지우기를 추천.
dec_ch = bottom_dec_ch if ii == 0 else concat_ch | ||
self.dec2dec_layers.append(dec2dec_layer(dec_ch, skip_ch, scale, fast_up=fast_up)) | ||
|
||
self.droupout = nn.Dropout(dropout) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
droupout > dropout 오타 정정
) | ||
|
||
def forward(self, enc_map_list: List[torch.Tensor]): | ||
dec_map_list = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dec_map, enc_map 설명이 있으면 좋을 것 같다.
👋! GitHub Classroom created this pull request as a place for your teacher to leave feedback on your work. It will update automatically. Don’t close or merge this pull request, unless you’re instructed to do so by your teacher.
In this pull request, your teacher can leave comments and feedback on your code. Click the Subscribe button to be notified if that happens.
Click the Files changed or Commits tab to see all of the changes pushed to the default branch since the assignment started. Your teacher can see this too.
Notes for teachers
Use this PR to leave feedback. Here are some tips:
For more information about this pull request, read “Leaving assignment feedback in GitHub”.
Subscribed: @mooniswan @Namgyu-Youn @syous154 @taehan79-kim @zangzoo @Donghwan127