ultralytics / yolov3

YOLOv3 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
10.23k stars 3.45k forks source link

queries for this project #1372

Closed lmw0320 closed 4 years ago

lmw0320 commented 4 years ago

I checked the codes, and have some queries for this project. If possible, pls help to answer it, thank in advance:

  1. normally, the YOLOV4 should be calculated the anchors data by kmeans before training, But I didn't find the corresponding code. Does it mean no need to calculate this in the code?

  2. I found the code as below: `method, mp, s = 3, 0.9, 0.2 npr = np.random npr.seed(int(time.time())) #the seed num would be changed by time flows, then how to recurrent the result? g = np.array([1, 1, 1, 1, 1, 1, 1, 0, .1, 1, 0, 1, 1, 1, 1, 1, 1, 1]) # gains ng = len(g)

    the three methods below are almost same, but just the third method restrict the lower and upper data..

    I'm not clear why to discriminate these methods..

    if method == 1: v = (npr.randn(ng) npr.random() g * s + 1) * 2.0 elif method == 2: v = (npr.randn(ng) npr.random(ng) g s + 1) * 2.0 elif method == 3: v = np.ones(ng) while all(v == 1): #v is just created before, it is certainly all the v is 1...Does it unnecessary? v = (g (npr.random(ng) < mp) npr.randn(ng) npr.random() * s + 1).clip(0.3, 3.0)`

  3. I found some hyparameters had been set in the codes, it seems also download evolve.txt to get a better hyparameters.. But why some of the hyparameters also need to be reset by codes... if hyparameters should be reset, why not to set the correct data at first... Due to my pool English, maybe some of questions are not described accuracy. I hope I can get the explaination from your side....Many thanks!

github-actions[bot] commented 4 years ago

Hello @lmw0320, thank you for your interest in our work! Ultralytics has open-sourced YOLOv5 at https://github.com/ultralytics/yolov5, featuring faster, lighter and more accurate object detection. YOLOv5 is recommended for all new projects.

To continue with this repo, 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:

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

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

glenn-jocher commented 1 year ago

@lmw0320 1. The YOLOv4 implementation does not require calculating the anchors separately as it is automatically calculated during training.

  1. The code snippet you've provided is related to the initialization of certain values and the ways they are manipulated. The different methods are used for variation and testing purposes.

  2. The hyperparameters are initially set based on general knowledge and then further fine-tuned through evolutionary algorithms. This iterative process helps in optimizing the hyperparameters for better performance and adaptability to diverse datasets.