Skip to content

Conversation

@rikunosuke
Copy link
Contributor

Summary

  • to_cocoto_pascalvoc 関数で height=0 または width=0 のタスクがスキップされる問題を修正
  • YOLO形式と異なり、これらの形式では除算が不要なため0値でも安全に出力可能

Changes

  • converters.py: to_cocoto_pascalvoc から早期リターンチェックを削除
  • tests/test_converters.py: 6つのテストケースを追加

Test plan

  • pytest tests/test_converters.py で全テスト通過を確認

🤖 Generated with Claude Code

…rters

Remove early return check for zero dimensions in to_coco and to_pascalvoc
functions. These formats don't use division by dimensions (unlike YOLO),
so zero values are safe and should be included in the output.

Add tests to verify zero dimension handling for both converters.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@h-iwata h-iwata self-requested a review December 22, 2025 09:07
Copy link

@h-iwata h-iwata left a comment

Choose a reason for hiding this comment

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

fastlabel_apiに対する単体テストの追加は今回初めてですかね?単体testは無いより合ったほうが格段にいいですね!
セットアップ部分は共通化した方が見やすいと思いますが、もう少し複雑な分岐のあるメソッドのテストを書くようになった時に色々と考えていくのがいいと思います。

@rikunosuke rikunosuke merged commit 5ae4986 into main Dec 22, 2025
1 check passed
@h-iwata
Copy link

h-iwata commented Dec 22, 2025

@rikunosuke
ちょっと気になったんですが、pytestを今後追加していくにあたって、pyproject.tomlにpytestの依存関係を定義しておいた方が良いですかね?
pythonにはあまり詳しく無いのですが、若干気になります

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.

3 participants