question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Training of YoloXS Model on Coco dataset

See original GitHub issue

Hi, I am currently reproducing the coco training on YoloXS model with line below:

python leondgarse/coco_train_script.py --det_header yolox.YOLOXS --data_name coco/2014 --batch_size 16

After my training using 30 epochs, I am getting poor result, as

# Show result
from keras_cv_attention_models.coco import data
data.show_image_with_bboxes(imm, bboxs, labels, confidences, num_classes=80)

b8fb80fa-e897-4a40-a8be-50d4a59b23a1

Do I have anything configure wrongly? Or any suggestion could I change? Thanks!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
leondgarsecommented, Jul 26, 2022

Maybe caused by the rescale_mode. Try:

from keras_cv_attention_models import yolox

# rescale_mode from coco_train_script.py is `torch` by default. Original yolox is `raw`
# input_shape from coco_train_script.py is 256 by default
model = yolox.YOLOXS(pretrained='checkpoints/{mode_save_name}.h5', input_shape=(256, 256, 3), rescale_mode='torch')

# Run prediction
from keras_cv_attention_models import test_images
imm = test_images.dog_cat()
bboxs, lables, confidences = model.decode_predictions(model(model.preprocess_input(imm)))[0]

# Show result
from keras_cv_attention_models.coco import data
data.show_image_with_bboxes(imm, bboxs, lables, confidences, num_classes=80)

I actually still cannot claim it a reproduced, as my YOLOX_Tiny only reaches 31.8 using:

CUDA_VISIBLE_DEVICES='1' TF_GPU_ALLOCATOR='cuda_malloc_async' ./coco_train_script.py \
--det_header yolox.YOLOXTiny -p adamw --freeze_backbone_epochs 0 --lr_decay_steps 100 \
--positional_augment_methods tx -i 640 --rescale_mode tf

yolox_tiny_640

1reaction
leondgarsecommented, Jul 27, 2022

It’s from the anthor’s repo, also the BGR input format for the original YOLOX weights.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Train YOLOv4 with Specific Categories of Images in MS ...
In this article, I will explain how to download and train YOLOv4 model with only specific categories of images in MS COCO dataset....
Read more >
Object detection: train YOLOv5 on a custom dataset
A guide to train a YOLO object detection algorithm on your dataset. It's based on the YOLOv5 open source repository by Ultralytics.
Read more >
How to Train A Custom Object Detection Model with YOLO v5
Our model inferencing in a preset setting. Let's see how to make it identify any object! We will cover the following material and...
Read more >
Deeplodocus/COCO-with-YOLO
In this tutorial, we will walk through each step to configure a Deeplodocus project for object detection on the COCO dataset using our...
Read more >
Yolo v3 training on coco data set - MATLAB Answers
Hey Asif ! I understand that you want to build a yolov3 object detector model and train it on the COCO dataset.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found