yijingru / BBAVectors-Oriented-Object-Detection

[WACV2021] Oriented Object Detection in Aerial Images with Box Boundary-Aware Vectors
MIT License
462 stars 87 forks source link

Code style #99

Open kleinicke opened 2 years ago

kleinicke commented 2 years ago

I really like your work. But you could further improve the code by following a few guidelines.

  1. Naming: A lot of variables are very hard to guess. You have the space to use longer variable names, so use it. Especially when they were described in detail within the paper. wh -> boxparams (exept of one occurence where it stands correctly for wight hight), reg -> offset. If you want you could even use the long version for cat and hm. The test dataloader names the image image, while the train dataloader names it input.

  2. The flow of data is complicated: The data gets often stored in variables, unpacked, transformed ... This makes it very hard to follow. You could probably have less functions that do more in one place without the need to completely transform reshape the data for the next function. Especially confusing is the use of self.decoder.ctdet_decode, func_utils.decode_prediction and nms in test.py These three things could be combined into one function or at least the data shouldn't get packed at the end of each of these functions to get unpacked and transformed for the next function.

yijingru commented 2 years ago

Thanks! I will consider improving the code.