lzccccc / SMOKE

SMOKE: Single-Stage Monocular 3D Object Detection via Keypoint Estimation
MIT License
696 stars 177 forks source link

How to add KITTI classes? #69

Closed yhchang1120 closed 2 years ago

yhchang1120 commented 2 years ago

Hi, I'm trying to add two classes(Truck and Van) for model to train. So, I modified some parts of files and trained model.

Changed file list and contents are below.

  1. configs/smoke_gn_vector.yaml (line 7) DETECT_CLASSES: ('Car', 'Cyclist', 'Pedestrian', 'Truck', 'Van')

  2. smoke/configs/defaults.py (line 52) _C.DATASETS.DETECT_CLASSES = ("Car", "Cyclist", "Pedestrian", "Truck", "Van") (line 116) _C.MODEL.SMOKE_HEAD.DIMENSION_REFERENCE = ((3.88, 1.63, 1.53), (1.78, 1.70, 0.58), (0.88, 1.73, 0.67), (10.11, 2.59, 3.25), (5.08, 1.90, 2.21) )

  3. smoke/data/datasets/kitti.py (line 19) TYPE_ID_CONVERSION = { 'Car': 0, 'Cyclist': 1, 'Pedestrian': 2, 'Truck': 3, 'Van': 4 }

  4. smoke/data/datasets/evaluation/kitti/kitti_eval.py (line 8) ID_TYPE_CONVERSION = { 0: 'Car', 1: 'Cyclist', 2: 'Pedestrian', 3: 'Truck', 4: 'Van' }

  5. smoke/modeling/smoke_coder.py (line 254)
    sc = SMOKECoder(depth_ref=(28.01, 16.32), dim_ref=((3.88, 1.63, 1.53), (1.78, 1.70, 0.58), (0.88, 1.73, 0.67), (10.11, 2.59, 3.25), (5.08, 1.90, 2.21)))

after that, i tested on test datasets and get poor result. It only could detects a little of Car class and most of inference results were empty text files(0 bytes).

Did I missed something? If anyone tried to add other KITTI classes, please notice me which parts were wrong... :D Thank you.

xiongqf-alice commented 2 years ago

Hi,I have the same problem, the training model with my own data,but the inference results were empty text files(0 bytes), have you solved it?

yhchang1120 commented 2 years ago

Hi,I have the same problem, the training model with my own data,but the inference results were empty text files(0 bytes), have you solved it?

Hi, @xiongqf-alice,. Actually, I didn't solved it. I'll reopen this issue.

xiongqf-alice commented 2 years ago

Hi,I have the same problem, the training model with my own data,but the inference results were empty text files(0 bytes), have you solved it?

Hi, @xiongqf-alice,. Actually, I didn't solved it. I'll reopen this issue.

Hi, I solved it, you only need to modified ImageSets/train.txt, the train.txt as follows: 000001 000002 000003 . . .

pummi823 commented 1 year ago

Dear yhchang1120, have you solve this problem?? I do the same modify as yours , i add to 10 classes, but also get poor results. Have you modify anything else to solve this problem?

pummi823 commented 1 year ago

I also observe the losses situation, it seems that the ”location“ in reg loss degrates well, but the 'dim' and 'ori' are very bad ,they are totally not deline T T. The hm_loss is also bad.

pummi823 commented 1 year ago

Hi,I have the same problem, the training model with my own data,but the inference results were empty text files(0 bytes), have you solved it?

Hi, @xiongqf-alice,. Actually, I didn't solved it. I'll reopen this issue.

Dear yhchang1120, have you solve this problem?? I do the same modify as yours , i add to 10 classes, but also get poor results. Have you modify anything else to solve this problem?