GithubHelp home page GithubHelp logo

Comments (3)

haitian2du avatar haitian2du commented on May 27, 2024

Hello,Mr.Droste.I changed the paths of datasets and run python run.py train, but it don't work. This is the traceback. I find that SALICON loaded with 0 samples in training. Could you please help me?

(unisal) LHY2@node2:/storage/LHY2/Code/unisal$ OMP_NUM_THEREADS=1 CUDA_VISIBLE_DEVICES=6 python run.py train
++++++++ /storage/LHY2/Dataset/VideoSaliency/SALICON
600 videos loaded (100.0%)
0 videos are too short [(0.0%)]
0 videos are too long (0.0%)
DHF1K      train dataset loaded with 600 samples
946 videos loaded (43.2%)
1244 videos are too short (56.8%)
0 videos are too long (0.0%)
Hollywood  train dataset loaded with 946 samples
82 videos loaded (88.2%)
11 videos are too short (11.8%)
0 videos are too long (0.0%)
UCFSports  train dataset loaded with 82 samples
**SALICON    train dataset loaded with 0 samples**

Epoch   0, lr 0.04000
DHF1K, phase train batch size: 4
Hollywood, phase train batch size: 4
UCFSports, phase train batch size: 4
SALICON, phase train batch size: 32
Traceback (most recent call last):
  File "run.py", line 97, in <module>
    fire.Fire()
  File "/storage/LHY/anaconda/envs/unisal/lib/python3.7/site-packages/fire/core.py", line 138, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/storage/LHY/anaconda/envs/unisal/lib/python3.7/site-packages/fire/core.py", line 471, in _Fire
    target=component.__name__)
  File "/storage/LHY/anaconda/envs/unisal/lib/python3.7/site-packages/fire/core.py", line 675, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "run.py", line 13, in train
    trainer.fit()
  File "/storage/LHY2/Code/unisal/unisal/train.py", line 237, in fit
    self.fit_epoch()
  File "/storage/LHY2/Code/unisal/unisal/train.py", line 265, in fit_epoch
    self.fit_phase()
  File "/storage/LHY2/Code/unisal/unisal/train.py", line 281, in fit_phase
    for src in sources}
  File "/storage/LHY2/Code/unisal/unisal/train.py", line 281, in <dictcomp>
    for src in sources}
  File "/storage/LHY2/Code/unisal/unisal/train.py", line 1067, in get_dataloader
    drop_last=True,
  File "/storage/LHY/anaconda/envs/unisal/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 802, in __init__
    sampler = RandomSampler(dataset)
  File "/storage/LHY/anaconda/envs/unisal/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 64, in __init__
    "value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integeral value, but got num_samples=0

I think the reason for this may be the problem of data path, you can download and put data according to the path as below, it will be fine. But I have other problems, please ask if you have encountered?
捕获2

from unisal.

GemLuo avatar GemLuo commented on May 27, 2024

Thank you ! I add self.phase_str in function get_img of data.py , and the program running normally. @haitian2du what's your problem?
def get_img(self, img_nr): img_file = self.dir / 'images' / self.phase_str / ( self.file_stem + self.file_nr.format(img_nr) + '.jpg') img = cv2.imread(str(img_file)) assert(img is not None) return np.ascontiguousarray(img[:, :, ::-1])

from unisal.

rdroste avatar rdroste commented on May 27, 2024

Sorry for the late reply. Glad to hear that the issue is solved. If you think that there is a general issue in nose_down_crop_y.get_img, please feel free to open a pull request.

from unisal.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.