-
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
補助情報の種類を「カスタム」ではなく適切な値にする #101
Conversation
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.
@@ -32,6 +32,7 @@ | |||
class SupplementaryData: | |||
data_id: str | |||
path: Path | |||
data_type: Literal["custom", "image", "text"] |
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.
@seraphr annofabapi.models.SupplementaryDataType
というEnumクラスがありますが、これを利用した方がよいのでしょうか?
それとも、anno3d/simple_data_uploader.py
はannofabapi
に依存しない方が良いのでしょうか?
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.
@seraphr と話したこと
annofabapi.models.SupplementaryDataType
を使うメリットはそこまでない- annofabapiのAPIを実行する関数で、
annofabapi.models.SupplementaryDataType
型の値を求めている訳ではな - メリットがあるとしたら、
SupplementaryDataType
の値が増えたときに、変更が不要なことぐらい
- annofabapiのAPIを実行する関数で、
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.
すみません、annofabapi.models.SupplementaryDataType
の存在を完全に見落としていました。
手元で実装を変えて試してみましたが、annofabapi.models.SupplementaryDataType
を使用しても同じ機能は果たせました。
ですが、個人的にはannofabapi.models.SupplementaryDataType
を使わない方がコードは見やすく、理解しやすい気がしました。
ただ、annofabapiのドキュメントにはSupplementaryDataTypeとはっきり記載がある点と、仰っていただいたようにSupplementaryDataType
の値が増えたときのことを考えると、使う方が合理的ともいえると思います。(実際に増えることがあるのかはわかりませんが...)
使った方にしておきたいということでしたら、annofabapi.models.SupplementaryDataType
を使ったバージョンをコミットしますが、いかがでしょうか?
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.
使った方にしておきたいということでしたら、annofabapi.models.SupplementaryDataTypeを使ったバージョンをコミットしますが、いかがでしょうか?
いろいろ試していただき、ありがとうございます。
曖昧なコメントで申し訳ありません。
@seraphr と話した際、「annofabapi.models.SupplementaryDataType
を使わない」という結果になったので、対応は不要です。
解決されるissue
fix #93
目的
入力データの補助情報の種類はcustom・image・textの3種類があるが、現状では補助情報種類はすべてcustomで登録されるようになっている。
そのため、補助情報の種類を以下の通り設定したい。
そうすることにより、入力データ詳細画面でカメラ画像のプレビューが表示されるようになる。
実装
補助情報クラス(SupplementaryData)に補助情報の種類(data_type)を追加し、apiに渡すようにした。
実行コマンド
anno3d project upload_kitti_data --annofab_id ${ANNO_ID} --annofab_pass ${ANNO_PASS} --project_id PROJECT_ID --kitti-dir KITTI_DIR [--force]
以上のコマンドを実行後、annofab上で入力データの詳細を閲覧すると、プレビューが正しく表示される。
実装前
実装後