Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretrain Weight #5

Closed
hustfyb opened this issue Jun 1, 2020 · 4 comments
Closed

Pretrain Weight #5

hustfyb opened this issue Jun 1, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@hustfyb
Copy link

hustfyb commented Jun 1, 2020

It seems the pretrain weight yolov5s.pt doesn't math yolov5s.yaml.
When train with
python train.py --img 320 --batch 16 --epochs 100 --data coco128.yaml --cfg yolov5s.yaml --weights yolov5s.pt --name coco128 --cache
It will report not compatible.
yolov5m.pt and yolov5l.pt are fine.

@hustfyb hustfyb added the bug Something isn't working label Jun 1, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2020

Hello @hustfyb, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Google Colab Notebook, Docker Image, and GCP Quickstart Guide for example environments.

If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom model or data training question, please note that Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as: - Cloud-based AI surveillance systems operating on hundreds of HD video streams in realtime. - Edge AI integrated into custom iOS and Android apps for realtime 30 FPS video inference. - Custom data training, hyperparameter evolution, and model exportation to any destination.

For more information please visit https://www.ultralytics.com.

@glenn-jocher
Copy link
Member

glenn-jocher commented Jun 2, 2020

@hustfyb thank you for the bug report. Yes you are correct, we are able to reproduce this issue that you detected. This is due to many recent updates to the repo and the time gap between the current repo and the state it was in when the pretrained checkpoints were trained. We are in the process of training updated checkpoints with the most current repo, and they will be uploaded as soon as they become available (about 1-2 weeks from now). In the meantime you can train yolov5s from scratch (as we do for our COCO results).

@acai66
Copy link

acai66 commented Jun 6, 2020

@hustfyb thank you for the bug report. Yes you are correct, we are able to reproduce this issue that you detected. This is due to many recent updates to the repo and the time gap between the current repo and the state it was in when the pretrained checkpoints were trained. We are in the process of training updated checkpoints with the most current repo, and they will be uploaded as soon as they become available (about 1-2 weeks from now). In the meantime you can train yolov5s from scratch (as we do for our COCO results).

thank you for graet works.
does the cfg content in Train Custom Data match pretrain weight, content:

# parameters
nc: 80  # number of classes   <------------------  UPDATE to match your dataset
depth_multiple: 0.33  # model depth multiple
width_multiple: 0.50  # layer channel multiple

# anchors
anchors:
  - [10,13, 16,30, 33,23]  # P3/8
  - [30,61, 62,45, 59,119]  # P4/16
  - [116,90, 156,198, 373,326]  # P5/32

# yolov5 backbone
backbone:
  # [from, number, module, args]
  [[-1, 1, Focus, [64, 3]],  # 1-P1/2
   [-1, 1, Conv, [128, 3, 2]],  # 2-P2/4
   [-1, 3, Bottleneck, [128]],
   [-1, 1, Conv, [256, 3, 2]],  # 4-P3/8
   [-1, 9, BottleneckCSP, [256, False]],
   [-1, 1, Conv, [512, 3, 2]],  # 6-P4/16
   [-1, 9, BottleneckCSP, [512, False]],
   [-1, 1, Conv, [1024, 3, 2]], # 8-P5/32
   [-1, 1, SPP, [1024, [5, 9, 13]]],
   [-1, 12, BottleneckCSP, [1024, False]],  # 10
  ]

# yolov5 head
head:
  [[-1, 1, nn.Conv2d, [na * (nc + 5), 1, 1, 0]],  # 12 (P5/32-large)

   [-2, 1, nn.Upsample, [None, 2, 'nearest']],
   [[-1, 6], 1, Concat, [1]],  # cat backbone P4
   [-1, 1, Conv, [512, 1, 1]],
   [-1, 3, BottleneckCSP, [512, False]],
   [-1, 1, nn.Conv2d, [na * (nc + 5), 1, 1, 0]],  # 16 (P4/16-medium)

   [-2, 1, nn.Upsample, [None, 2, 'nearest']],
   [[-1, 4], 1, Concat, [1]],  # cat backbone P3
   [-1, 1, Conv, [256, 1, 1]],
   [-1, 3, BottleneckCSP, [256, False]],
   [-1, 1, nn.Conv2d, [na * (nc + 5), 1, 1, 0]],  # 21 (P3/8-small)

   [[], 1, Detect, [nc, anchors]],  # Detect(P3, P4, P5)
  ]

@glenn-jocher
Copy link
Member

@hustfyb @acai66 new models have been released which address both of these issues. See c14368d and view readme table for updated results.

manole-alexandru added a commit to manole-alexandru/yolov5-uolo that referenced this issue Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants