JJBOY / BMN-Boundary-Matching-Network

A pytorch-version implementation codes of paper: "BMN: Boundary-Matching Network for Temporal Action Proposal Generation", which is accepted in ICCV 2019.
MIT License
291 stars 64 forks source link

csv_mean_100/v_t_D9MYkEPEo.csv' does not exist #11

Open Light-- opened 5 years ago

Light-- commented 5 years ago
$ python3.6 main.py --mode train
train subset video numbers: 9649
validation subset video numbers: 4728
/home/user/.local/lib/python3.6/site-packages/torch/optim/lr_scheduler.py:100: UserWarning: Detected call of `lr_scheduler.step()` before `optimizer.step()`. In PyTorch 1.1.0 and later, you should call them in the opposite order: `optimizer.step()` before `lr_scheduler.step()`.  Failure to do this will result in PyTorch skipping the first value of the learning rate schedule.See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate
  "https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate", UserWarning)
Traceback (most recent call last):
  File "main.py", line 204, in <module>
    main(opt)
  File "main.py", line 178, in main
    BMN_Train(opt)
  File "main.py", line 103, in BMN_Train
    train_BMN(train_loader, model, optimizer, epoch, bm_mask)
  File "main.py", line 25, in train_BMN
    for n_iter, (input_data, label_confidence, label_start, label_end) in enumerate(data_loader):
  File "/home/user/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 819, in __next__
    return self._process_data(data)
  File "/home/user/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 846, in _process_data
    data.reraise()
  File "/home/user/.local/lib/python3.6/site-packages/torch/_utils.py", line 385, in reraise
    raise self.exc_type(msg)
FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/home/user/.local/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
    data = fetcher.fetch(index)
  File "/home/user/.local/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/user/.local/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/user/BMN-Boundary-Matching-Network/dataset.py", line 42, in __getitem__
    video_data = self._load_file(index)
  File "/home/user/BMN-Boundary-Matching-Network/dataset.py", line 68, in _load_file
    video_df = pd.read_csv(self.feature_path + "csv_mean_" + str(self.temporal_scale) + "/" + video_name + ".csv")
  File "/home/user/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 685, in parser_f
    return _read(filepath_or_buffer, kwds)
  File "/home/user/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 457, in _read
    parser = TextFileReader(fp_or_buf, **kwds)
  File "/home/user/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 895, in __init__
    self._make_engine(self.engine)
  File "/home/user/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 1135, in _make_engine
    self._engine = CParserWrapper(self.f, **self.options)
  File "/home/user/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 1917, in __init__
    self._reader = parsers.TextReader(src, **kwds)
  File "pandas/_libs/parsers.pyx", line 382, in pandas._libs.parsers.TextReader.__cinit__
  File "pandas/_libs/parsers.pyx", line 689, in pandas._libs.parsers.TextReader._setup_parser_source
FileNotFoundError: [Errno 2] File b'./data/activitynet_feature_cuhk/csv_mean_100/v_t_D9MYkEPEo.csv' does not exist: b'./data/activitynet_feature_cuhk/csv_mean_100/v_t_D9MYkEPEo.csv'
JJBOY commented 5 years ago

This error is raised because the pickle version. It's abvious that the file path you read is encoded by byte mode by the prefix 'b'. You should convert it to string style. b'./data/activitynet_feature_cuhk/csv_mean_100/v_t_D9MYkEPEo.csv' -> './data/activitynet_feature_cuhk/csv_mean_100/v_t_D9MYkEPEo.csv'

Light-- commented 5 years ago

This error is raised because the pickle version. It's abvious that the file path you read is encoded by byte mode by the prefix 'b'. You should convert it to string style. b'./data/activitynet_feature_cuhk/csv_mean_100/v_t_D9MYkEPEo.csv' -> './data/activitynet_feature_cuhk/csv_mean_100/v_t_D9MYkEPEo.csv'

isn't it because there is no "csv_mean_100/v_t_D9MYkEPEo.csv" ? You didn't share that file under the folder of "activitynet_feature_cuhk"....

JJBOY commented 5 years ago

These files are so big so you should download them by yourself as I writed in READEME.

Light-- commented 5 years ago

These files are so big so you should download them by yourself as I writed in READEME.

the pth file(BMN_best.pth.tar) is big, but maybe the CSV file(v_t_D9MYkEPEo.csv) is not that big? Could u pls. share the CSV file? because your program running needs the csv file....

JJBOY commented 5 years ago

Please read the README carefully. I already offered the link to download the CSV files.

Light-- commented 5 years ago

Please read the README carefully. I already offered the link to download the CSV files.

Okay, i see, in https://github.com/wzmsltw/BSN-boundary-sensitive-network He said:

Download Datasets
We support experiments with publicly available dataset ActivityNet 1.3 for temporal action proposal generation now. To download this dataset, please use official ActivityNet downloader to download videos from the YouTube.

To extract visual feature, we adopt TSN model pretrained on the training set of ActivityNet, which is the challenge solution of CUHK&ETH&SIAT team in ActivityNet challenge 2016. Please refer this repo TSN-yjxiong to extract frames and optical flow and refer this repo anet2016-cuhk to find pretrained TSN model.

For convenience of training and testing, we rescale the feature length of all videos to same length 100, and we provide the rescaled feature at here Google Cloud or Baidu Yun. If you download features from BaiduYun, please use cat zip_csv_mean_100.z* > csv_mean_100.zip before unzip. After download and unzip, please put csv_mean_100 directory to ./data/activitynet_feature_cuhk/ .

the download link is: https://pan.baidu.com/s/19GI3_-uZbd_XynUO6g-8YQ#list/path=%2Fsharelink371590537-608856444000610%2Ftsn_feature&parentPath=%2Fsharelink371590537-608856444000610

semchan commented 4 years ago

meet the same issue when I donwload from Baidu, do you have any suggestion? thanks a lot

lucky-23 commented 4 years ago

I met with the same issue. Can anyone please tell me how to solve this problem?