# MMDetection Installation on Ubuntu 20.18 CUDA 10.2 ```bash pip install torch==1.10.0+cu102 torchvision==0.11.0+cu102 -f https://download.pytorch.org/whl/torch_stable.html ``` ```bash pip install mmcv-full==1.7.0 -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.10.0/index.html ``` now go to your project folder ```bash cd mmdetection ``` remove `apex` folder if there is already one ```bash git clone --recursive https://github.com/NVIDIA/apex cd apex/ ``` go to `apex/apex/amp/utils.py` replace from line number 93 to 97 with following ```python if x in cache: cached_x = cache[x] next_functions_available = False if x.requires_grad and cached_x.requires_grad: if len(cached_x.grad_fn.next_functions) > 1: next_functions_available = True # Make sure x is actually cached_x's autograd parent. if next_functions_available and cached_x.grad_fn.next_functions[1][0].variable is not x: ``` ```bash! python setup.py install cd .. ``` ```bash! pip install -v -e . ``` Modify the paths inside `mmdetection/configs/_base_/your_config_file.py` finally run the training script ```bash! python tools/train.py path/to/config/file ``` For testing please follow the official repository instructions just replace the configuration files which are provided to you inside zip files given to you example command ```python python tools/test.py path/to/config/file path/to/checkpoint/file --eval bbox ``` # yolov7 installation I followed the official repository for installation Training: `commands.txt` is the file where we have training commands Testing: `commands.txt` is the file where we have testing commands Please see the arguments passed to training and testing commands. Go to those files to make required changes for experiments.