ReDet
ReDet copied to clipboard
Training detector on specific categories
Hello, Do you know how can i train a model on specific data categories from DOTA dataset? I want to train it on two categories only: large-vehicle and small-vehicle, i don't want the rest of categories. Thanks in advance..
Assume you have downloaded DOTA dataset, you can remove annotations of these classes by writing a class-filtering script (i.e., remove lines containing these classes in dota/labelTxt/*.txt).
Then, you can use our script to prepare the dataset: https://github.com/csuhan/ReDet/blob/master/DOTA_devkit/prepare_dota1.py
While, remember to change wordname:
https://github.com/csuhan/ReDet/blob/0b9addf3c2734659fd6ffc7824f2e659fde4419c/DOTA_devkit/prepare_dota1.py#L10-L13
Then, change CLASSES in the dataset loader:
https://github.com/csuhan/ReDet/blob/0b9addf3c2734659fd6ffc7824f2e659fde4419c/mmdet/datasets/DOTA.py#L4-L13
Finally, change the corresponding config file in configs/ReDet/*.py
Thanks a lot! But after running the training file, i had the following error:
`Traceback (most recent call last): File "/home/fadwasa/anaconda3/envs/redet/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 724, in _try_get_data data = self._data_queue.get(timeout=timeout) File "/home/fadwasa/anaconda3/envs/redet/lib/python3.7/multiprocessing/queues.py", line 104, in get if not self._poll(timeout): File "/home/fadwasa/anaconda3/envs/redet/lib/python3.7/multiprocessing/connection.py", line 257, in poll return self._poll(timeout) File "/home/fadwasa/anaconda3/envs/redet/lib/python3.7/multiprocessing/connection.py", line 414, in _poll r = wait([self], timeout) File "/home/fadwasa/anaconda3/envs/redet/lib/python3.7/multiprocessing/connection.py", line 928, in wait return ready File "/home/fadwasa/anaconda3/envs/redet/lib/python3.7/selectors.py", line 203, in exit self.close() File "/home/fadwasa/anaconda3/envs/redet/lib/python3.7/site-packages/torch/utils/data/_utils/signal_handling.py", line 66, in handler _error_if_any_worker_fails() RuntimeError: DataLoader worker (pid 967102) is killed by signal: Killed.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train.py", line 96, in
Try to set workers_per_gpu=0
https://github.com/csuhan/ReDet/blob/0b9addf3c2734659fd6ffc7824f2e659fde4419c/configs/ReDet/ReDet_re50_refpn_1x_dota1.py#L143
I tried this solution but with no luck. Shall the system be installed locally in my machine? it is installed in an external hard drive. I also work on the master branch.