- Install poetry based on the instructions provided in their documentation.
- Clone timesformer along with additional dependencies using:
This would create TimeSformer, and ND-Activity-Recognition-Feeback directories in your working directory
git clone [email protected]:darpa-sail-on/TimeSformer.git git clone [email protected]/darpa-sail-on/ND-Activity-Recognition-Feeback.git
- Create a virtual environment and install the components using the following commands:
cd TimeSformer git checkout m24-agent poetry install poetry run pip install ../ND-Activity-Recognition-Feeback poetry shell
-
Create a conda virtual environment and activate it:
conda create -n timesformer python=3.8 -y source activate timesformer
-
Install the following packages:
- torchvision:
pip install torchvision
orconda install torchvision -c pytorch
- fvcore:
pip install 'git+https://github.com/facebookresearch/fvcore'
- simplejson:
pip install simplejson
- einops:
pip install einops
- timm:
pip install timm
- PyAV:
conda install av -c conda-forge
- psutil:
pip install psutil
- scikit-learn:
pip install scikit-learn
- OpenCV:
pip install opencv-python
- tensorboard:
pip install tensorboard
- sail-on-client:
pip install sail-on-client
- torchvision:
-
Build the TimeSformer codebase by running:
git clone [email protected]:darpa-sail-on/TimeSformer.git cd TimeSformer git checkout m24-agent python -m pip install .
-
Install Additional dependencies using:
pip install ../ND-Activity-Recognition-Feeback
- Download the
checkpoint_epoch_00015.pyth
from google drive - Download the evm model (HDF5 File) from google drive in the same directory as the model from the previous step.
- If you are using the files on your machine use the following command
HYDRA_FULL_ERROR=1 sail-on-client --config-dir <your working directory>/TimeSformer/configs/ \ --config-name dry_run_local \ test_root=<your working directory>/TimeSformer/data \ protocol.smqtk.config.dataset_root=<root directory for videos from first prerequisites> \ model_root=<root directory where models were downloaded from step 1 and 2> \ [email protected]=[timesformer_base] \ protocol.smqtk.config.test_ids=[OND.0.10001.6438158]
- Download the
checkpoint_epoch_00015.pyth
from google drive - If you are using the evaluation use the following command
HYDRA_FULL_ERROR=1 sail-on-client --config-dir <your working directory>/TimeSformer/configs/ \ --config-name feature_extraction_par \ server_url=<url for server> \ protocol.smqtk.config.dataset_root=<root directory for videos> \ model_root=<root directory for models> \ protocol.smqtk.config.feature_dir=<root directory where features are saved> \ [email protected]=[timesformer_base] \ protocol.smqtk.config.test_ids=[<comma seperated list of test ids>]
- If you are using the files on your machine use the following command
HYDRA_FULL_ERROR=1 sail-on-client --config-dir <your working directory>/TimeSformer/configs/ \ --config-name feature_extraction_local \ test_root=<root directory for tests> \ protocol.smqtk.config.dataset_root=<root directory for videos> \ model_root=<root directory for models> \ protocol.smqtk.config.feature_dir=<root directory where features are saved> \ [email protected]=[timesformer_base] \ protocol.smqtk.config.test_ids=[<comma seperated list of test ids>]
- [Optional] To use slurm with the feature extraction use the following command
HYDRA_FULL_ERROR=1 sail-on-client --config-dir configs/ \ --config-name feature_extraction_local \ --multirun protocol.smqtk.config.test_ids=["OND.9.99999.0"],["OND.9.99999.1"],["OND.9.99999.2"],["OND.9.99999.3"],["OND.9.99999.4"],["OND.9.99999.5"],["OND.9.99999.6"],["OND.9.99999.7"] \ test_root=/data/datasets/m24-activity-test/feature_extraction_tests \ protocol.smqtk.config.dataset_root=/data/datasets/m24-activity-test/1115_2021 \ model_root=/home/khq.kitware.com/ameya.shringi/models/timesformer-m24 \ protocol.smqtk.config.feature_dir=/home/khq.kitware.com/ameya.shringi/features/timesformer-m24 \ [email protected]=[timesformer_base] \ hydra/launcher=veydrus \
-
Download the features from google drive
-
Download the evm model (HDF5 File) from google drive
-
With the evaluation server use the following command
HYDRA_FULL_ERROR=1 sail-on-client --config-dir configs/ \ --config-name system_detection_par \ server_url=<url for server> \ model_root=<root directory where models are stored> \ protocol.smqtk.config.feature_dir=<root directory where features are stored> \ protocol.smqtk.config.dataset_root=<root directory of vidoes> \ [email protected]=[timesformer_base] \ protocol.smqtk.config.test_ids=[<comma seperated test ids>]
-
With files on the machine using the following command
HYDRA_FULL_ERROR=1 sail-on-client --config-dir configs/ \ --config-name system_detection_local \ test_root=<root directory with tests> \ protocol.smqtk.config.feature_dir=<root directory with features> \ protocol.smqtk.config.dataset_root=<root directory with videos> \ [email protected]=[timesformer_base] protocol.smqtk.config.test_ids=[<comma seperate test ids>]
-
Download the features from google drive
-
Download the evm model (HDF5 File) from google drive
-
With the evaluation server use the following command
HYDRA_FULL_ERROR=1 sail-on-client --config-dir configs/ \ --config-name given_detection_par \ server_url=<url for server> \ model_root=<root directory where models are stored> \ protocol.smqtk.config.feature_dir=<root directory where features are stored> \ protocol.smqtk.config.dataset_root=<root directory of vidoes> \ [email protected]=[timesformer_rd] \ protocol.smqtk.config.test_ids=[<comma seperated test ids>]
-
With files on the machine using the following command
HYDRA_FULL_ERROR=1 sail-on-client --config-dir configs/ \ --config-name given_detection_local \ test_root=<root directory with tests> \ protocol.smqtk.config.feature_dir=<root directory with features> \ protocol.smqtk.config.dataset_root=<root directory with videos> \ [email protected]=[timesformer_rd] protocol.smqtk.config.test_ids=[<comma seperate test ids>]
- Download the features from google drive
- Download the evm model (HDF5 File) from google drive
- Download additional file available in the following links:
- With the evaluation server use the following command
HYDRA_FULL_ERROR=1 sail-on-client --config-dir configs/ \ --config-name system_detection_classification_feedback_par \ server_url=<url for server> \ model_root=<root directory where models are stored> \ protocol.smqtk.config.feature_dir=<root directory where features are stored> \ protocol.smqtk.config.dataset_root=<root directory of vidoes> \ [email protected]=[timesformer_feedback] \ protocol.smqtk.config.test_ids=[<comma seperated test ids>]
- With files on the machine using the following command
HYDRA_FULL_ERROR=1 sail-on-client --config-dir configs/ \ --config-name system_detection_classification_feedback_local \ test_root=<root directory with tests> \ protocol.smqtk.config.feature_dir=<root directory with features> \ protocol.smqtk.config.dataset_root=<root directory with videos> \ [email protected]=[timesformer_feedback] protocol.smqtk.config.test_ids=[<comma seperate test ids>]
- Download the features from google drive
- Download the evm model (HDF5 File) from google drive
- With the evaluation server use the following command
HYDRA_FULL_ERROR=1 sail-on-client --config-dir configs/ \ --config-name given_detection_detection_feedback_par \ server_url=<url for server> \ model_root=<root directory where models are stored> \ protocol.smqtk.config.feature_dir=<root directory where features are stored> \ protocol.smqtk.config.dataset_root=<root directory of vidoes> \ [email protected]=[timesformer_detection_feedback] \ protocol.smqtk.config.test_ids=[<comma seperated test ids>]
- With files on the machine using the following command
HYDRA_FULL_ERROR=1 sail-on-client --config-dir configs/ \ --config-name given_detection_detection_feedback_local \ test_root=<root directory with tests> \ protocol.smqtk.config.feature_dir=<root directory with features> \ protocol.smqtk.config.dataset_root=<root directory with videos> \ [email protected]=[timesformer_detection_feedback] protocol.smqtk.config.test_ids=[<comma seperate test ids>]