Skip to content

Conversation

@Akkiy3314
Copy link
Contributor

#145
export_semantic_segmentationのメソッドにclassesとstart_indexを追加

2023-04-12.15.33.58.mov

@Akkiy3314 Akkiy3314 requested a review from ShuheiUchida April 12, 2023 06:59
@Akkiy3314 Akkiy3314 self-assigned this Apr 12, 2023
Copy link

@ShuheiUchida ShuheiUchida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確認お願いします!

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).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

どんな使い方をするためのものなのかもう少し補足お願いしますー

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメント追加しました。
(英語自信ないですが...)

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).

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

とかですかね?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

提案ありがとうございます。
修正しました!

classes.append(annotation["value"])
classes = list(set(classes))
classes.sort()
target_classes = classes

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()

Copy link
Contributor Author

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,

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は足してください。
ローカルでのテストも忘れずにお願いします。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

追加しました!
動作確認通ること確認しています。
スクリーンショット 2023-04-14 13 37 03

@Akkiy3314
Copy link
Contributor Author

@ShuheiUchida
レビュー箇所修正したので
お手数をおかけしますが確認お願い致します。

Copy link

@ShuheiUchida ShuheiUchida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確認お願いします!

tasks: list,
output_dir: str = os.path.join("output", "instance_segmentation"),
pallete: List[int] = const.COLOR_PALETTE,
classes: List = [],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instance_segmentationではclassは使いませんー!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

削除しました!

ShuheiUchida
ShuheiUchida previously approved these changes Apr 14, 2023
Copy link

@ShuheiUchida ShuheiUchida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@ShuheiUchida
Copy link

@ueno-k-work @ryoKaz
コード確認済みです!
マージの運用がわかっておらず
この後お願いできますでしょうか?

@takahiro-tamenishi takahiro-tamenishi changed the title add mothod export segmentation add method export segmentation Apr 17, 2023
@Akkiy3314
Copy link
Contributor Author

@takahiro-tamenishi
こちらstart_index修正したので確認お願い致します!

Copy link
Contributor

@takahiro-tamenishi takahiro-tamenishi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Akkiy3314
コメントしました!

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).
Copy link
Contributor

@takahiro-tamenishi takahiro-tamenishi Apr 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Akkiy3314
スレッド

細かいですが、以下コメントの追加をお願いします!

・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の箇所も同様で、追加をお願いします!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

すみません、、コメント修正漏れてました、、
指摘内容で修正しました!
ありがとうございます🙇

Copy link
Contributor

@takahiro-tamenishi takahiro-tamenishi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@takahiro-tamenishi takahiro-tamenishi merged commit 68846b8 into main Apr 18, 2023
@takahiro-tamenishi takahiro-tamenishi deleted the 143_add_method_export branch April 18, 2023 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants