yancie-yjr / StreamYOLO

Real-time Object Detection for Streaming Perception, CVPR 2022
Apache License 2.0
298 stars 40 forks source link

A small bug in README about Dataset Prep. #12

Open jingwenchong opened 1 year ago

jingwenchong commented 1 year ago

For Developers

Hi! When reproducing your results on Argoverse-HD, I found that the directory structure you provided in Quick Start - Dataset preparation section doesn't match the original directory structure of Argoverse-HD dataset, as well as your code required. The directory structure in Quick Start - Dataset preparation section:

StreamYOLO
├── exps
├── tools
├── yolox
├── data
│   ├── Argoverse-1.1
│   │   ├── annotations
│   │       ├── tracking
│   │           ├── train
│   │           ├── val
│   │           ├── test
│   ├── Argoverse-HD
│   │   ├── annotations
│   │       ├── test-meta.json
│   │       ├── train.json
│   │       ├── val.json

should be edited as:

StreamYOLO
├── exps
├── tools
├── yolox
├── data
│   ├── Argoverse-1.1
│   │   ├── tracking
│   │       ├── train
│   │       ├── val
│   │       ├── test
│   ├── Argoverse-HD
│   │   ├── annotations
│   │       ├── test-meta.json
│   │       ├── train.json
│   │       ├── val.json

which matches the directory structure of the Argoverse-HD dataset: Screenshot 2022-09-21 151703.png

For Stargazers

BTW, if anyone manually modifies the directory structure to fit the one provided in README, an AssertionError will occur: (some parts of file path was edited)

AssertionError: Caught AssertionError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "%HOME%\anaconda3\envs\streamyolo\lib\site-packages\torch\utils\data\_utils\worker.py", line 198, in _worker_loop
    data = fetcher.fetch(index)
  File "%HOME%\anaconda3\envs\streamyolo\lib\site-packages\torch\utils\data\_utils\fetch.py", line 44, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "%HOME%\anaconda3\envs\streamyolo\lib\site-packages\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "%HOME%\anaconda3\envs\streamyolo\lib\site-packages\yolox\data\datasets\datasets_wrapper.py", line 110, in wrapper
    ret_val = getitem_fn(self, index)
  File "%WORKSPACE%\StreamYOLO\exps\data\tal_flip_mosaicdetection.py", line 255, in __getitem__
    img, support_img, label, support_label, img_info, id_ = self._dataset.pull_item(idx)
  File "%WORKSPACE%\StreamYOLO\exps\dataset\tal_flip_one_future_argoversedataset.py", line 227, in pull_item
    img = self.load_resized_img(index)
  File "%WORKSPACE%\StreamYOLO\exps\dataset\tal_flip_one_future_argoversedataset.py", line 180, in load_resized_img
    img = self.load_image(index)
  File "%WORKSPACE%\StreamYOLO\exps\dataset\tal_flip_one_future_argoversedataset.py", line 196, in load_image
    assert img is not None
AssertionError

If anyone gets the similar error message, the content in For Developers may be helpful.

GjtZ commented 1 year ago

Is yolox in the figure copied from yolox sub file in YOLOX

jingwenchong commented 1 year ago

Is yolox in the figure copied from yolox sub file in YOLOX

I think if you have performed Installation part in README, the YOLOX module should have been installed via pip3. Therefore you don't need to copy the yolox directory from YOLOX manually. Also there isn't a yolox directory in StreamYOLO's root dir.

Or if you didn't follow README and setup the environment as your own, and you didn't have YOLOX module installed for some reason. Then you may have to clone yolox directory from YOLOX. I guess this method should be OK, but I am not quite sure whether StreamYOLO will perform as expected.

GjtZ commented 1 year ago

Thank you for your earlier answer. Your answer is right. I have a question I would like to ask.

When you reproduce the results on the coco dataset, does the output folder need to be automatically created in the system root directory? I do not have root permission and will report a permission error. Have you met, or your output folder is under the root directory?

the error: /data/output/streamyolo/m_s50_onex_dfp_tal_flip mkdir(‘/data’,mode=511) [Errno 13] Permission denied:'/data'

jingwenchong commented 1 year ago

Thank you for your earlier answer. Your answer is right. I have a question I would like to ask.

When you reproduce the results on the coco dataset, does the output folder need to be automatically created in the system root directory? I do not have root permission and will report a permission error. Have you met, or your output folder is under the root directory?

the error: /data/output/streamyolo/m_s50_onex_dfp_tal_flip mkdir(‘/data’,mode=511) [Errno 13] Permission denied:'/data'

Sorry to hear that. For project requirements I not only reproduced the result but also modified the code on Windows, so I didn't met similar errors with permission.

But despite of platform difference, the output should be put under project directory instead of root directory. That is, you should use a relative path but not an absolute path.

So, try:

./data/output/streamyolo/m_s50_onex_dfp_tal_flip

instead of:

/data/output/streamyolo/m_s50_onex_dfp_tal_flip

in your command.

If the error stills, provide more information so that I (and others) may help you out.

GjtZ commented 1 year ago

Thanks. The problem has been solved. Just change the output folder directory to the current subdirectory in the configuration file.

Tezcan98 commented 1 year ago

please help my issue :( #15