Coder Social home page Coder Social logo

Comments (6)

zachteed avatar zachteed commented on September 27, 2024

The dataloader isn't able to find the training dataset. Either use the directory structure in the Readme or change the dataset_path variable in datasets.py

from raft.

zzl777 avatar zzl777 commented on September 27, 2024

Thanks for answer. I still have some questions: 1.Does the command (./train_mixed.sh) run only when the four datasets all in the directory? If I only have two datasets(such as Sintel and DAVIS), can I train the network? 2. If I want to train another dataset(my private dataset), what should I do? Thanks!!!

from raft.

zachteed avatar zachteed commented on September 27, 2024

You can modify the function

def fetch_dataloader(args, TRAIN_DS='C+T+K+S+H'):

to

 def fetch_dataloader(args, TRAIN_DS='C+T+K+S+H'):
       aug_params = {'crop_size': args.image_size, 'min_scale': -0.2, 'max_scale': 0.6, 'do_flip': True}
       sintel_clean = MpiSintel(aug_params, split='training', dstype='clean')
       sintel_final = MpiSintel(aug_params, split='training', dstype='final')
       train_dataset = sintel_clean + sintel_final
       train_loader = data.DataLoader(train_dataset, batch_size=args.batch_size, 
           pin_memory=False, shuffle=True, num_workers=4, drop_last=True)

      print('Training with %d image pairs' % len(train_dataset))
      return train_loader

to train only using sintel data. To train on another dataset, you will need to write your own subclass of FlowDataset

from raft.

zzl777 avatar zzl777 commented on September 27, 2024

Thanks again for your answer! I modified the function to train only using Sintel dataset. However, there exists another question during training:
Traceback (most recent call last):
File "train.py", line 247, in
train(args)
File "train.py", line 192, in train
results.update(evaluate.validate_chairs(model.module))
File "/data/zzl/anaconda3/envs/raft/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 15, in decorate_context
return func(*args, **kwargs)
File "/data/zzl/PycharmProjects/RAFT/evaluate.py", line 90, in validate_chairs
epe = np.mean(np.concatenate(epe_list))
File "<array_function internals>", line 5, in concatenate
ValueError: need at least one array to concatenate
what should I do to address it? thanks a lot!

from raft.

zachteed avatar zachteed commented on September 27, 2024

In the training command, you need to change the flag to specify the validation dataset, from --validation chairs to --validation sintel

from raft.

zzl777 avatar zzl777 commented on September 27, 2024

Thanks again for your answer! If I want to save all the output flow images in a directory (just flow images, not an original frame on the top and a flow image on the below in the output of demo.py), what should I do? thanks a lot!

from raft.

Related Issues (20)

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.