Megvii-BaseDetection / Megvii-BaseDetection/YOLOX
train error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
Hi.
I'm trying to train with your code and I'm getting an AssertionError.
The training was fine when I ran train.py first, but for some reason the training was aborted, when I ran train.py again and loaded the latest_ckpt.pth that was saved at the filrst training, I got an error.
commond: python tools/train.py -f exps/example/custom/yolox_m_table.py -d 1 -b 2 --fp16 -o --resume YOLOX_outputs/yolox_m_table/latest_ckpt.pth
error: Traceback (most recent call last):
File "tools/train.py", line 87, in <module>
exp.merge(args.opts)
File "/home/Data/Projects/YOLOX-main/yolox/exp/base_exp.py", line 64, in merge
assert len(cfg_list) % 2 == 0
AssertionError
and this is my config:
class Exp(MyExp):
def __init__(self):
super(Exp, self).__init__()
# ---------------- model config ---------------- #
self.num_classes = 2
self.depth = 0.67
self.width = 0.75
self.exp_name = os.path.split(os.path.realpath(__file__))[1].split(".")[0]
# ---------------- dataloader config ---------------- #
self.data_num_workers = 2
self.input_size = (960, 960) # (height, width)
self.data_dir = "/home/Data/Datasets/Table_Detection/coco"
self.train_ann = "instances_train2017.json"
self.val_ann = "instances_val2017.json"
# -------------- training config --------------------- #
self.max_epoch = 100
self.basic_lr_per_img = 0.01 / 2.0
self.no_aug_epochs = 15
# ----------------- testing config ------------------ #
self.test_size = (960, 960)
hope for your reply.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tools/train.py and follow the resume command into yolox/exp/base_exp.py, especially exp.merge(args.opts), then reproduce the AssertionError using the command and config shown. Done means identifying why the resume invocation produces an invalid options list and documenting or correcting the supported command, with a regression check if the relevant test entry point is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100