-
Notifications
You must be signed in to change notification settings - Fork 4
add method export segmentation #146
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
Conversation
ShuheiUchida
left a comment
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.
確認お願いします!
fastlabel/__init__.py
Outdated
| tasks is a list of tasks (Required). | ||
| output_dir is output directory(default: output/semantic_segmentation)(Optional). | ||
| pallete is color palette of index color. Ex: [255, 0, 0, ...] (Optional). | ||
| classes is fix classes list (Optional). |
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.
どんな使い方をするためのものなのかもう少し補足お願いしますー
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.
コメント追加しました。
(英語自信ないですが...)
fastlabel/__init__.py
Outdated
| output_dir is output directory(default: output/semantic_segmentation)(Optional). | ||
| pallete is color palette of index color. Ex: [255, 0, 0, ...] (Optional). | ||
| classes is fix classes list (Optional). | ||
| start_index is color pallet start index (Optional). |
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.
ちょっと意味が通じないかも?です。
start_index is the first index of color index corresponding to color pallete
とかですかね?
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.
提案ありがとうございます。
修正しました!
fastlabel/__init__.py
Outdated
| classes.append(annotation["value"]) | ||
| classes = list(set(classes)) | ||
| classes.sort() | ||
| target_classes = classes |
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.
以下の形の方がシンプルだと思いましたー
if len(classes) == 0:
for task in tasks:
for annotation in task["annotations"]:
classes.append(annotation["value"])
classes = list(set(classes))
classes.sort()
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.
こちら修正しました!
SQLのファンクションが頭にこびりついてましたね...
| output_dir: str = os.path.join("output", "semantic_segmentation"), | ||
| pallete: List[int] = const.COLOR_PALETTE, | ||
| classes: List = [], | ||
| start_index: int = 1, |
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.
export_instance_segmentation側にもstart_indexは足してください。
ローカルでのテストも忘れずにお願いします。
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.
|
@ShuheiUchida |
ShuheiUchida
left a comment
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.
確認お願いします!
fastlabel/__init__.py
Outdated
| tasks: list, | ||
| output_dir: str = os.path.join("output", "instance_segmentation"), | ||
| pallete: List[int] = const.COLOR_PALETTE, | ||
| classes: 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.
instance_segmentationではclassは使いませんー!
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.
削除しました!
ShuheiUchida
left a comment
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.
LGTM!!
|
@ueno-k-work @ryoKaz |
|
@takahiro-tamenishi |
takahiro-tamenishi
left a comment
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.
@Akkiy3314
コメントしました!
fastlabel/__init__.py
Outdated
| tasks is a list of tasks (Required). | ||
| output_dir is output directory(default: output/instance_segmentation)(Optional). | ||
| pallete is color palette of index color. Ex: [255, 0, 0, ...] (Optional). | ||
| start_index is the first index of color index corresponding to color pallete (Optional). |
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.
細かいですが、以下コメントの追加をお願いします!
・start_indexは0か1が入る想定。
The expected values for start_index are either 0 or 1.
・start_indexが0のときは、背景色と同じ色になってしまうので全てのピクセルにアノテーションがある前提であること。
When start_index is 0, all pixels are assumed to have annotations because they become the same color as the background.
export_semantic_segmentationの箇所も同様で、追加をお願いします!
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.
すみません、、コメント修正漏れてました、、
指摘内容で修正しました!
ありがとうございます🙇
takahiro-tamenishi
left a comment
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.
LGTM!

#145
export_semantic_segmentationのメソッドにclassesとstart_indexを追加
2023-04-12.15.33.58.mov