Coder Social home page Coder Social logo

Comments (4)

ahmetgunduz avatar ahmetgunduz commented on August 17, 2024 4

Hi @mhsattarian,
Thanks for kinds comments and well explained questions. You are right, I should have explained offline and online testing in more details.

what is the difference between run_online and run_offline scripts?

run online is for real-time analysis. It has different data loading methods as slide through the frames and make predictions in real time simulation environment. It runs online_test.py, in which the real-time detection and classification algorithms are implemented as it is described in the article.
run offline, on the other hand, is for training and evaluation of the models on the predefined clips of videos. This is the usual way of training a model. When you want to train a model for a dataset you need to train them first offline and then if you want to see their performance on a real-time scenario you would use run_online script by giving pretrained path, which is also depends either detector or classifier.

what changes should be applied to these scripts parameters in order to just test your model on a video?

As an example I am giving offline testing. But you can also do the same for online testing by providing two architecture paths (detector and classifier). SO the followings are for run_offline.sh

First you need to run offline_test.pyinstead of main.py, which is for training.
for dataset configurations (the followings are based on my path configurations for Egogesture dataset):

--root_path ~/ \
--video_path /data2/EgoGesture/images \
--annotation_path ~/Real-time-GesRec/annotation_EgoGesture/egogesturebinary.json\

for pretrained path configuration:

--resume_path MyRes3D-Ahmet/report/egogesture_resnetl_10_Depth_8_9939.pth \
-dataset egogesture \
--sample_duration 8 \
--model resnetl \
--model_depth 10 \
--batch_size 8 \
--n_classes 2 \ # if it is detector 2, if classifier # of classes in that dataset
--n_finetune_classes 2 \ # if it is detector 2, if classifier # of classes in that dataset
--modality Depth \

my pretrained model's names are in following convention <model_depth><sample_duration>.pth

why run_offline script calls model.py instead of offline_test.py?

I believe you meant main.py. main.py is for training, offline_test.py is for testing.

why there is no pretrain_path_det and pretrain_path_clf defined in run_online or run_offline scripts? aren't pretrained weights needed in order to test the model?

pretrain_path_{det or clf} is for detector and classifier architecture paths
and they are defined only for online testing. Because in online testing, it used detector and classifier together, However for offline training and testing you do this process separately, and you can only use pretrained_path in for those.

Hope this is clear. If not, you may check the paper again. As a last note, run offline is for training models and make them ready for online (real-time) testing.

Please let me know if this works for you.

from real-time-gesrec.

mhsattarian avatar mhsattarian commented on August 17, 2024

for example, can you answer these questions?:

  • what is the difference between run_online and run_offline scripts?
  • what changes should be applied to these scripts parameters in order to just test your model on a video?
  • why run_offline script calls model.py instead of offline_test.py?
  • why there is no pretrain_path_det and pretrain_path_clf defined in run_online or run_offline scripts? aren't pretrained weights needed in order to test the model?

from real-time-gesrec.

mhsattarian avatar mhsattarian commented on August 17, 2024

thank you @ahmetgunduz for answering all of the questions in detail.

from real-time-gesrec.

ahmetgunduz avatar ahmetgunduz commented on August 17, 2024

you are welcome! @mhsattarian

from real-time-gesrec.

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.