Skip to content
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

Feature/visualization (visualize_bbox functionに修正が必要なので) #32

Merged
merged 22 commits into from
Sep 27, 2022

Conversation

AtomScott
Copy link
Owner

No description provided.

BB_WIDTH_INDEX = 2
BB_HEIGHT_INDEX = 3

unique_team_ids = self.columns.get_level_values("TeamID").unique()
Copy link
Owner Author

Choose a reason for hiding this comment

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

ここのfor loopは

frame_df = self.loc[self.index==frame_idx]
bboxes = frame_df.to_list()

にしてから

for bbox in bboxes:
    x, y, x2, y2 = bbox[:4]
    frame = add ...

的な感じで出力するのがシンプルだと思いますが、修正可能でしょうか?

"""

Copy link
Owner Author

Choose a reason for hiding this comment

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

なんとなく、この関数はほぼbbdf.stack(('TeamID', 'PlayerID')).reset_index().valuesで簡略化できると思います。
pandasのstack/unstackあたりのドキュメンテーションが参考になります。
https://pandas.pydata.org/docs/user_guide/reshaping.html#reshaping-by-stacking-and-unstacking

Copy link
Owner Author

Choose a reason for hiding this comment

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

(ほぼなので列の入れ替えとか、obj_idの作成が必要)

bb_right(float) : Bounding box right coordinate
bb_bottom(float) : Bounding box bottom coordinate
conf(float) : Confidence score
class_id(int) : Class ID. In the normal case, follow the value of the coco image dataset.
Copy link
Owner Author

Choose a reason for hiding this comment

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

cocoのidであることはどこで使ってる? 

Copy link
Collaborator

Choose a reason for hiding this comment

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

これ評価指標を算出するときに使ってます。(可視化のときには使ってない)

bb_bottom(float) : Bounding box bottom coordinate
conf(float) : Confidence score
class_id(int) : Class ID. In the normal case, follow the value of the coco image dataset.
obj_id(int) : Object ID. This id is a unique integer value for each track
Copy link
Owner Author

Choose a reason for hiding this comment

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

obj_idがplayer_idとteam_idから作られるなら明記しといたほうがいいような気します。 

"""Convert a dataframe column to a 2-dim list for evaluation of object detection.

Args:
df (pd.DataFrame): Dataframe
df (BBoxDataFrame): BBoxDataFrame
xywh (bool): If True, convert to x1y1x2y2 format. Defaults to True.
Copy link
Owner Author

Choose a reason for hiding this comment

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

これあってる?

yield img_


def add(
Copy link
Owner Author

Choose a reason for hiding this comment

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

add_bbox_to_frameの方が適切?

Copy link
Collaborator

Choose a reason for hiding this comment

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

変更しました

colors = [_rgb_to_bgr(item) for item in _COLOR_NAME_TO_RGB[color]]
color_value, _ = colors

image = cv2.rectangle(image, (left, top), (right, bottom), color, 2)
Copy link
Owner Author

Choose a reason for hiding this comment

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

cv2.rectangleにのcolorってstrを受け付けないようながするのでなおしてください(これで動作する?)

Copy link
Collaborator

Choose a reason for hiding this comment

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

BB_WIDTH_INDEX = 3
BB_HEIGHT_INDEX = 4

color_list = []
Copy link
Owner Author

Choose a reason for hiding this comment

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

ランダムに色を生成する関数を作ってもいいかもね
参考になると思うのでhttps://stackoverflow.com/questions/28999287/generate-random-colors-rgb

@AtomScott
Copy link
Owner Author

コード見ました。コメントした部分が直されていてよくなったと思います。

pandasを活かしてよりシンプルな方法でdataframeを扱えるところがいくつかありそうだったのでpandasのuser guideなどを参考にしてみてください。

https://pandas.pydata.org/docs/user_guide/reshaping.html#reshaping-by-stacking-and-unstacking
https://pandas.pydata.org/docs/user_guide/advanced.html
https://pandas.pydata.org/docs/user_guide/groupby.html

あと、動作確認をするのに作ったコードをテストとして書き直して、SoccerTrack/tests/test_dataframe.pyに入れてくれると助かります。

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

from ..utils import MovieIterator
from .base import SoccerTrackMixin
from ..logging import logger

Copy link
Collaborator

Choose a reason for hiding this comment

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

to_listメソッドでPerformanceWarningが発生して、出力に影響が出ているわけではないので警告を消すようなメソッcontainerを追加しました。

pandasの開発者も上記メソッドで避けても良い(?)と言っているみたいなので参考にしています。
twopirllc/pandas-ta#340

Copy link
Owner Author

Choose a reason for hiding this comment

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

どんなwarning だった?

PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider using pd.concat instead.  To get a de-fragmented frame, use `newframe = frame.copy()`

と一緒?

コードを治すためのヒントが含まれている場合もあります。

BB_BOTTOM_INDEX = 4
BB_WIDTH_INDEX = 3
BB_HEIGHT_INDEX = 4
LABEL_INDEX = 7

_COLOR_NAMES = list(_COLOR_NAME_TO_RGB)


Copy link
Collaborator

Choose a reason for hiding this comment

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

色をランダムに生成する部分は未実装です。すみません。

Copy link
Owner Author

Choose a reason for hiding this comment

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

このままでOKです。

@IkumaUchida
Copy link
Collaborator

file.pyにて、load_motload_dfの出力が揃っていなかったので修正しました。具体的には、BBoxDataFrameが定めるAttributeを生成できるように修正しています。

  • bb_left
  • bb_top
  • bb_width
  • bb_height
  • conf

Copy link
Owner Author

@AtomScott AtomScott left a comment

Choose a reason for hiding this comment

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

全体的にコードの質とドキュメンテーションの充実度がよくなってきていると思います。

コメントしたところの確認お願いします。

from ..utils import MovieIterator
from .base import SoccerTrackMixin
from ..logging import logger

Copy link
Owner Author

Choose a reason for hiding this comment

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

どんなwarning だった?

PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider using pd.concat instead.  To get a de-fragmented frame, use `newframe = frame.copy()`

と一緒?

コードを治すためのヒントが含まれている場合もあります。

@@ -78,74 +111,105 @@ def _constructor(self: pd.DataFrame) -> Type[BBoxDataFrame]:

# df: pd.DataFrame

def to_list(self: BBoxDataFrame, xywh: bool = True) -> list[list[float]]:
def get_id(self: BBoxDataFrame) -> list[tuple[Any, Any]]:
Copy link
Owner Author

Choose a reason for hiding this comment

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

get_idが何を指しているかが不明なので、get_player_ids, get_teams_idsに分けた方がいい気がします。もし選手のattributesに対してループをかけたいのであれば、soccertrack mixinで実装したiter_playersを使ってください。

Returns:
id_list(list[tuple[Any, Any]]): List of team id and player id.
"""
id_list = []
Copy link
Owner Author

Choose a reason for hiding this comment

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

この関数、
self.columns.levels[0]

self.columns.levels[1]
で代用できませんか?

# append_object_id
obj_id = 0

for id in sorted(set(id_list)):
Copy link
Owner Author

Choose a reason for hiding this comment

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

SoccerTrackMixinのto_long_df()を使ってからclass_id, team_player_idなどをforループ使わずに計算できそうな気もします。

Copy link
Owner Author

Choose a reason for hiding this comment

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

bbdf.iter_players()

Copy link
Owner Author

Choose a reason for hiding this comment

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

df = df.to_long_df()
df['class_id'] = f(team_id, player_id)から計算される
df['obj_id'] = {team_id}_{player_id}?

for bbox in bbox_2dim_list:
bbox[FRAME_INDEX] = bbox[FRAME_INDEX] - frame_idx_start # start from 0
if xywh:
Copy link
Owner Author

Choose a reason for hiding this comment

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

xywhってどんな状況で使うんだっけ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

to_listに渡されるbboxの列がxywhの場合は、xyx2y2に変更するような形を意図したはず。
けどsoccertrackmixinを使うならあまり必要がないかも知れない

)
frame = add(
frame, int(x), int(y), int(x2), int(y2), label=label, color=color
)
return frame

def visualize_bbox(self, video_path: str) -> Iterator[np.ndarray]:
Copy link
Owner Author

Choose a reason for hiding this comment

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

分かりにくいのでvisualize_framesとかに変更しちゃいましょう。

Copy link
Collaborator

Choose a reason for hiding this comment

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

visualize_framesに変更しました。

@@ -202,10 +251,18 @@ def visualize_bbox(self, video_path: str) -> Iterator[np.ndarray]:
Returns:
None
"""

movie_iterator = MovieIterator(video_path)
Copy link
Owner Author

Choose a reason for hiding this comment

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

この関数、変更前の状態に戻されてそうな予感(コメント・不要なfor-loop等)

Copy link
Collaborator

Choose a reason for hiding this comment

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

pullが間違ったのかも知れません。
major refactorのコードに書き換えます。

@@ -357,18 +357,18 @@ def load_mot(filename: _pathlike) -> GPSDataFrame:

df_list = []
for playerid, group in groups:
group['conf'] = 1.0
group['class_id'] = int(0) # TODO: classid of person
group["conf"] = 1.0
Copy link
Owner Author

Choose a reason for hiding this comment

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

conf=1にするとロードしたデータも上書きしちゃいそうです。

Copy link
Collaborator

Choose a reason for hiding this comment

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

このままだと確かにそうですね、
confの列を引き続きBBoxdataframeに入れるのならば、
推論時の出力と、正解データの出力でconfに渡す値を切り替えられるようにしたいかもです
(load_dfの引数にgt=True/Falseを追加するイメージ)

player_id = column[1]
id_list.append((team_id, player_id))

for id in sorted(set(id_list)):
Copy link
Owner Author

Choose a reason for hiding this comment

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

conf=1にするとロードしたデータも上書きしちゃいそうです。

@@ -7,11 +7,13 @@

Copy link
Owner Author

Choose a reason for hiding this comment

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

このファイルはコミットミス?

Copy link
Collaborator

Choose a reason for hiding this comment

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

ごめんなさいなにも触れずにコミットしてました。
230行目のloopですが、tqdmメソッドを入れることによってエラーが発生しました。その為tqdmを一時的に外しています。

ただそのエラー内容を保存していなかったので、後でエラーを再現して再度コメントします。

Copy link
Collaborator

@IkumaUchida IkumaUchida Sep 27, 2022

Choose a reason for hiding this comment

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

utilsのmake_videoメソッドの231行目で以下のエラーが出ます
該当コード

for frame in tqdm(frames, desc=f"Writing video", level="INFO"):

エラー内容

/home/guest/.local/lib/python3.9/site-packages/rich/live.py:229: UserWarning: install "ipywidgets" for Jupyter 
support
  warnings.warn('install "ipywidgets" for Jupyter support')
None
Exception in thread Thread-6:
Traceback (most recent call last):
  File "/opt/anaconda3/envs/soccertrack/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/home/guest/.local/lib/python3.9/site-packages/rich/live.py", line 32, in run
    self.live.refresh()
  File "/home/guest/.local/lib/python3.9/site-packages/rich/live.py", line 221, in refresh
    self._live_render.set_renderable(self.renderable)
  File "/home/guest/.local/lib/python3.9/site-packages/rich/live.py", line 203, in renderable
    renderable = self.get_renderable()
  File "/home/guest/.local/lib/python3.9/site-packages/rich/live.py", line 98, in get_renderable
    self._get_renderable()
  File "/home/guest/.local/lib/python3.9/site-packages/rich/progress.py", line 1539, in get_renderable
/home/guest/dev_repo/SoccerTrack/soccertrack/logging.py:117: TqdmExperimentalWarning: rich is experimental/alpha
  return tqdm(*args, **kwargs)
    renderable = Group(*self.get_renderables())
  File "/home/guest/.local/lib/python3.9/site-packages/rich/progress.py", line 1544, in get_renderables
    table = self.make_tasks_table(self.tasks)
  File "/home/guest/.local/lib/python3.9/site-packages/rich/progress.py", line 1568, in make_tasks_table
    table.add_row(
  File "/home/guest/.local/lib/python3.9/site-packages/rich/progress.py", line 1573, in <genexpr>
    else column(task)
  File "/home/guest/.local/lib/python3.9/site-packages/rich/progress.py", line 524, in __call__
    renderable = self.render(task)
  File "/opt/anaconda3/envs/soccertrack/lib/python3.9/site-packages/tqdm/rich.py", line 34, in render
    total = int(task.total)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Output exceeds the [size limit](command:workbench.action.openSettings?[). Open the full output data [in a text editor](command:workbench.action.openLargeOutput?733c860c-793e-437c-bf34-d2a280d19f0c)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In [12], line 7
      5 save_dir = './'
      6 save_path = os.path.join(save_dir, 'bbox_FISH.mp4')
----> 7 make_video(img_, save_path)

File ~/dev_repo/SoccerTrack/soccertrack/utils/utils.py:231, in make_video(frames, outpath, vcodec, preset, crf, ss, t, c, height, width, input_framerate, logging)
    226 writer = WriteGear(
    227     output_filename=outpath, compression_mode=True, logging=logging, **output_params
    228 )
    230 # loop over
--> 231 for frame in tqdm(frames, desc=f"Writing video", level="INFO"):
    232 
    233     # simulating RGB frame for example
    234     frame_rgb = frame[:, :, ::-1]
    236     # writing RGB frame to writer

File ~/dev_repo/SoccerTrack/soccertrack/logging.py:117, in tqdm(level, *args, **kwargs)
    115 enable = logger.level(LOG_LEVEL).no <= logger.level(level.upper()).no
    116 kwargs.update({"disable": not enable})
--> 117 return tqdm(*args, **kwargs)

File /opt/anaconda3/envs/soccertrack/lib/python3.9/site-packages/tqdm/rich.py:117, in tqdm_rich.__init__(self, *args, **kwargs)
    115 self._prog = Progress(*progress, **options)
...
     38         ["", "K", "M", "G", "T", "P", "E", "Z", "Y"],
     39         self.unit_divisor,
     40     )

TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

intにNoneTypeが渡されると出るけど、どの部分に該当しているのかがわからず、、

またlogging.pyのtqdmメソッドで使われるtqdm.richに原因があるのかと思って、ドキュメンテーションからソースコードを見ようとしたけど、リンクが切れていたので確認出来ていないです。

また、 from tqdm.rich import tqdm from tqdm import tqdmに変更すると、動作はするみたいで、以下のような可視化はされます。
Screen Shot 2022-09-27 at 9 20 42

いずれにせよ、今回PRのスコープ外な気がしますが、動作する形で修正箇所をコミットします。(utils.pyとlogging.pyをコミット予定)

Copy link
Owner Author

Choose a reason for hiding this comment

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

これ1~2行目の

/home/guest/.local/lib/python3.9/site-packages/rich/live.py:229: UserWarning: install "ipywidgets" for Jupyter 
support
  warnings.warn('install "ipywidgets" for Jupyter support')
None

が問題だったりする? pip install ipywidgets で解決するかも


self.index: pd.MultiIndex

if self.index[0] != 0:
Copy link
Owner Author

@AtomScott AtomScott Sep 26, 2022

Choose a reason for hiding this comment

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

元のファイルにどうにかしたい
229~230消去でOK

Copy link
Collaborator

Choose a reason for hiding this comment

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

次のコミットでは消します。

logger.debug(
f"x:{x}, y:{y}, x2:{x2}, y2:{y2}, label:{label}, color:{color}"
)
frame = add(
Copy link
Owner Author

Choose a reason for hiding this comment

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

add変更が反映されていない模様(?)

Copy link
Collaborator

Choose a reason for hiding this comment

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

add_bbox_to_frameという名前に変更しました。

Copy link
Owner Author

@AtomScott AtomScott left a comment

Choose a reason for hiding this comment

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

色分けは急ぎじゃないので、PRをマージするところを今日中に行う
・utils.pyをPRから外す
・File.pyはそのまま
・bboxdataframeはよう変更

BB_BOTTOM_INDEX = 4
BB_WIDTH_INDEX = 3
BB_HEIGHT_INDEX = 4
LABEL_INDEX = 7

_COLOR_NAMES = list(_COLOR_NAME_TO_RGB)


Copy link
Owner Author

Choose a reason for hiding this comment

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

このままでOKです。

# append_object_id
obj_id = 0

for id in sorted(set(id_list)):
Copy link
Owner Author

Choose a reason for hiding this comment

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

bbdf.iter_players()

# append_object_id
obj_id = 0

for id in sorted(set(id_list)):
Copy link
Owner Author

Choose a reason for hiding this comment

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

df = df.to_long_df()
df['class_id'] = f(team_id, player_id)から計算される
df['obj_id'] = {team_id}_{player_id}?

if self.index[0] != 0:
self.index = self.index - self.index[0]
frame_df = self.loc[self.index == frame_idx].copy()
bboxes = frame_df.to_list()
Copy link
Owner Author

Choose a reason for hiding this comment

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

for index, group in frame_df.iter_players():
    x, y, x2, y2 = group['bbox', ...
    label = index[0] + '_' + index[1]

id_list.append((team_id, player_id))
return id_list

def to_list(self: BBoxDataFrame, xywh: bool = True) -> Any:
Copy link
Owner Author

Choose a reason for hiding this comment

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

to_listは外して, SoccerTrackMixinの関数を使う

Copy link
Collaborator

Choose a reason for hiding this comment

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

to_listのうちbboxdfに列(obj_idなど)を追加する箇所が別のメソッド()として持っておいてもよさそうで、それ以外はSoccerTrackMixinの関数を使う

Copy link
Owner Author

@AtomScott AtomScott Sep 27, 2022

Choose a reason for hiding this comment

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

列を追加する機能は便利そうなので、SoccerTrackMixinにadd_attribute的な関数を加えてもいいと思いました

@AtomScott
Copy link
Owner Author

OK!

@AtomScott AtomScott merged commit 5842441 into feature/major_refactor Sep 27, 2022
@AtomScott AtomScott deleted the feature/visualization branch September 27, 2022 06:32
AtomScott added a commit that referenced this pull request Jan 17, 2023
* add poetry conf

* fix sphinx config path

* rename sphinx config

* update docs

* update project requirements

* add poetry reqs command

* add logo

* hide sidebar name

* Update README.md

* add citation

* change furo colours

* add temp

* Update README.md

* Update video paths

* squash later

* Update pyproject.toml

* docs: 📝 bulk update documentations

* build: ⬆️ update dependencies

* add iou.ipynb(not completed) (#24)

* add iou.ipynb(not completed)

* add iou function

* add ap&map

* fix calc_ap and calc_map

* fix evaluation function

* add metrics.py

* add scripts into metrics.py

* move metrics.py to sandbox

* fix metrics.py

* add mots eval code(no fix from Trackeval)

* refactor: ♻️ re-organize code structure

* test: 🧪 add test structure

* add iou_score tests

* fix: 🐛 fix iou_score related methods

* Add Google-style docstring to object detection metrics

* add prospector automation

* Update prospector.yml

Co-authored-by: Atom Scott <[email protected]>

* Delete sandbox directory

* Delete papers directory

* Add prospector workflow (#26)

* Update and rename prospector.yml to lint.yml

* Update lint.yml

* update requirements

* update requirements

* try new config

* add paper preview image

* add paper preview image

* docs: 📝 Update dataset install instructions

* docs: 📝 add Kaggle and PWC badges

* Fix table

* Add video links for github

* refactor: ♻️ pass prospector

* add updates bbox dataframe handling

* update document sections (sidebar)

* Function/mot eval (#27)

* add iou.ipynb(not completed)

* add iou function

* add ap&map

* fix calc_ap and calc_map

* fix evaluation function

* add metrics.py

* add scripts into metrics.py

* move metrics.py to sandbox

* fix metrics.py

* add mots eval code(no fix from Trackeval)

* add hota metrics(Codes not yet organized)

* add hota metrics(Codes not yet organized)

* add mot_evaluation_metrics

* delete sandbox

* fix mot metrics

* delete sandbox (re commit)

* delete run_eval.py and metrics.py

* Apply the evaluation index to bbox_df

* Fix the path of the library to import

* remove unnecessary comments

Co-authored-by: Atom Scott <[email protected]>

* add chapter 1 on intro to soccertrack

* add chapter 2 & 3 on intro to soccertrack

* feat: ✨ better logging tools

* style: 🎨

* fix: 🐛 fix inspect bug

* feat: ✨ add automatic dataset downloader

* add small sample csv file

* docs: 📝 Add `Dataset Preparation` tutorial

* docs: 📝 make dataframes viewable

* add sample tracking data

* fix: 🐛 add custom prompt & confirm functions

* build: ➕ add kaggle dependency

* chore: 🧑‍💻 add make command for lint

* feat: ✨ add styling function to make dataframes visible in docs

* add kaggle import

* docs: 📝 update docs

* add acknowledgements

* (bugfix) copy notebooks to docs on rtd build (#31)

* update docs
* copy notebooks to docs on rtd build

* feature/visualization (#29)

* Added the function to visualize the bbox in one frame.

* Added video-enabled visualization function

* Add Visualization Functions

* Apply prospector to bboxdataframe

* update notebooks

* remove old notebook

* Organize soccertrack content

* update index

* Add star history

* feat: ✨ add useful iter accessors

* Rename GPSDataFrame to CoordinatesDataFrame

* Feature/visualization (visualize_bbox functionに修正が必要なので) (#32)

* Added the function to visualize the bbox in one frame.

* Added video-enabled visualization function

* Add Visualization Functions

* Apply prospector to bboxdataframe

* fix visualize_bbox function

* fix visualization

* fix visualization functions

* del index sort of visualize_frame in bboxdataframe

* remove utils.py from PR

* fix utils and logging

* fix utils

* fix utils

* fix utils

* fix utils

* fix logging

* fix logging

* fix logging

* fix logging

* add comments to code

* delete comments

* fix visualization functions

Co-authored-by: IkumaUchida <[email protected]>

* update dataframe

* typo

* feat: ✨ Easier way to access downloaded dataset (#36)

* small fixes

* Feature/visualization (#37)

* Added the function to visualize the bbox in one frame.

* Added video-enabled visualization function

* Add Visualization Functions

* Apply prospector to bboxdataframe

* fix visualize_bbox function

* fix visualization

* fix visualization functions

* del index sort of visualize_frame in bboxdataframe

* remove utils.py from PR

* fix utils and logging

* fix utils

* fix utils

* fix utils

* fix utils

* fix logging

* fix logging

* fix logging

* fix logging

* add comments to code

* delete comments

* fix visualization functions

* add get_frame

Co-authored-by: IkumaUchida <[email protected]>

* add pix_fmt option to make_video

* update bboxdataframe.py

* fix fps rate bug

* Update README.md

* Update README.md

* ignore external directory

* add to_yolov5_format function

* fix mapping when arg is None

* don't ignore .gitkeep!

* add tutorials to train yolov5 model

* add script to build dataset in YOLOv5 format

* bug fix for logger

* fix default mapping for yolov5

* read dataframe from numpy (statsbomb)

* add tracking notebook for deep sort

* add issue template

* Docs/get started (#39)

* update docs

* copy notebooks to docs on rtd build

* Add .deepsource.toml

* add bbdf2ndjson and upload function🔼 (#38)

* add bbdf2ndjson and upload function🔼

* fix uploader

* fix file.py

* Update .deepsource.toml

* Fix dangerous default argument (#40)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* update logger tests

* update tests for ap_score

* clean up commented code

* add tests and update map_score

* bug fix

* add get_frame function

* fix soccertrack.logging to soccertrack.logger

* adding notebook for yolov5

* adding notebook for appearance feature extraction

* Rename appearance_feature_extraction_with_arcface.ipynb to appearance_feature_extraction_with_resnet18.ipynb

* Function/detection eval (#41)

* fix so that the test passes.

* delete comment out

* fix object_detection_metrics

* Merge PR request

* Fix iou_scores for when bbox is out of range

* Add first draft of training with a basic motion model

* Add iter_frames()

* Add to_list_of_tuples_format

* add tests for get_git_root()

* fix imports from sandbox

* Pull Request: Fix of Mot evaluation (#43)

* Add preprocessing functions for mot metrics

* fix mot eval script

* add mot eval test(only case 1)

* fix tracking evaluation notebook(add description)

* add details of tracking metrics

* reflect docs change and test acceleration

* Change index for bbox info to a global variable

* Fix metrics so that tests pass

* replace np.float with generic float

* replace np.int with generic int

* add idf1, DetA, AssA examples

* Fix evaluation script to handle missing track data

* add drop option to iteration methods

* use iter_players instead of groupby

Co-authored-by: Atom Scott <[email protected]>

* black

* update poetry

* black

* black

* trying to merge a stash pop after too long...

* merge new fixes

* merge

* add detection model

* add image feature extractor model

* add tracking model

* cleanup notebooks

* update poetry

* Update poetry from 1.2.0b1 to 1.3.1

* add draw function

* Create LICENSE

* fix: incorrect type casting

* improve performance speed of `preprocess_for_mot_eval`

* Remove Codacy badge

* Update README.md

* Update .deepsource.toml

* Format code with black and isort (#45)

This commit fixes the style issues introduced in 34fe885 according to the output
from black and isort.

Details: https://deepsource.io/gh/AtomScott/SoccerTrack/transform/22f41986-1297-4a37-8e40-e2e595cc9c46/

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Format code with black and isort (#44)

This commit fixes the style issues introduced in 34fe885 according to the output
from black and isort.

Details: https://deepsource.io/gh/AtomScott/SoccerTrack/transform/ba1386e0-f471-4159-8620-a000d16e741d/

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Update the docs! (#46)

* add Documentation section

* bulk update of the docs

* ignore autoapi

* add sphinx-autoapi

* add sphinx-autoapi

* wasn't necessary

* add checks for detections and trackers

* add single object tracker

* add matching functions

* add CostMatrixMetrics

* fix circular import

* refactor multi_object_tracker

* refactor imports

* add notebook tutorials

* Format code with black and isort (#47)

This commit fixes the style issues introduced in fe62d8b according to the output
from black and isort.

Details: https://deepsource.io/gh/AtomScott/SoccerTrack/transform/55d99477-e19f-4c8c-9022-a5938920150b/

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Format code with black and isort (#48)

This commit fixes the style issues introduced in fe62d8b according to the output
from black and isort.

Details: https://deepsource.io/gh/AtomScott/SoccerTrack/transform/526cd8e9-59c0-4fd5-808c-9da21d89d84e/

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* add a working muli object tracker

* add EuclideanCMM

* add EuclideanCMM

* hotfix: skip sim_score compute when length is zero

* hotfix for linear_sum_assignment_with_inf

* add KalmanTracker prototype

* Format code with black and isort (#49)

This commit fixes the style issues introduced in 89b26b0 according to the output
from black and isort.

Details: https://deepsource.io/gh/AtomScott/SoccerTrack/transform/503ec624-ab31-47fb-8df2-dca9a2c533c7/

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Format code with black and isort (#50)

This commit fixes the style issues introduced in 89b26b0 according to the output
from black and isort.

Details: https://deepsource.io/gh/AtomScott/SoccerTrack/transform/5ac4c7da-4986-4b96-bba8-3d1305e2e2ea/

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* ignore tests/outputs

* add visualize frame, visualize frames to codf w/ tests

* add sample codf for tests

* Format code with black and isort (#51)

This commit fixes the style issues introduced in 87e2a98 according to the output
from black and isort.

Details: https://deepsource.io/gh/AtomScott/SoccerTrack/transform/59908cc6-7c0d-42cd-b45e-4b12743fac71/

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Format code with black and isort (#52)

This commit fixes the style issues introduced in 87e2a98 according to the output
from black and isort.

Details: https://deepsource.io/gh/AtomScott/SoccerTrack/transform/d523db55-0b40-445f-b386-c3aa4e528174/

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Format code with black and isort (#53)

This commit fixes the style issues introduced in dc69ea9 according to the output
from black and isort.

Details: https://deepsource.io/gh/AtomScott/SoccerTrack/transform/d454df1f-f632-42ef-b11e-6ed659e28f91/

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* add documentation

* add examples to documentation

* fix: missing new line in documentation

* Create CODE_OF_CONDUCT.md (#54)

* Create publish-to-test-pypi.yml

* update [tool.poetry]

* Update pyproject.toml

* Update pyproject.toml

* Update pyproject.toml

* testing changes

Co-authored-by: Ikuma Uchida <[email protected]>
Co-authored-by: IkumaUchida <[email protected]>
Co-authored-by: DeepSource Bot <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
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.

2 participants