Closed JiaLim98 closed 3 years ago
@JiaLim98 I think you may find the answer by reading the code in models/yolo.py
@JiaLim98 https://github.com/jinfagang/nb this lib provide a more intuitive way to build yolov5 model architecture, you can read about it:
@JiaLim98 the YOLOv5 model yamls are very simple. The columns are just as shown in the comments:
@glenn-jocher @jinfagang @seekFire Thank you all for the help. I will leave this thread open for a while, I may have further questions or anyone who needs the understanding of the architecture can use this thread as well. Cheers!
Hi @glenn-jocher,
Previously I have succesfully changed the .yaml file and completed the training. However, now that I want to test the weights, I get the following error:
It seems like test.py is not using the modified .yaml file I used for training. Are there any parts of the code need to be changed when one wants to modify the architecture besides the .yaml file?
Cheers, JiaLim98
@JiaLim98 model yaml files are only used to construct a model initially before training starts. test.py and detect.py do not require any model.yaml. The model.pt file is fully self contained, nothing else is required.
This is one of the major advancements we implemented when moving from YOLOv3.
@glenn-jocher In that case, can you let me know are there any other causes to this problem? Training completed perfectly, but there's problem with the feature processing during testing.
@JiaLim98 if your model trains then it will test and detect normally as well. It's possible changes you've made to the repo are the cause of the error.
It looks like your code may also be a bit out of date, you might want to simply reclone the repo and try your new yaml again.
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.
How to edit the backbone field in "*.yaml" file, and how to include other architecture into backbone into the file named yolov5l.yaml' ....for example: by default the backbone architecture for yolov5 is "densenet", if i want to include some other architecture, how to include... pls help
Sir, how to write configuration file for yolov5... yolov5 doens't have configuration file ... but instead has .yaml file....pls help
what is the output of the package use... ayaml file?
@PraveenMNaik models are defined in model yamls, i.e.: https://github.com/ultralytics/yolov5/blob/303f3785ae0fe8e8fff1eedebe25ec516a1baab1/models/yolov5s.yaml#L3-L48
Sir,
@PraveenMNaik models are defined in model yamls, i.e.: https://github.com/ultralytics/yolov5/blob/303f3785ae0fe8e8fff1eedebe25ec516a1baab1/models/yolov5s.yaml#L3-L48
You can customize a model yaml to any architecture you'd like and use any new modules you'd like by defining them in models/common.py
@glenn-jocher , Sir where is the module defined for "Conv", [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 .... how to understand this... why neck is not defined.... how does connection from Backbone to head happens in this module....
@glenn-jocher sir does, --evolve used for tuning hyperparameter....if so... why dont we use said method first ...based on the result update the hyperparameter file and then go for training.. is it better approach
@PraveenMNaik models are in models/common.py: https://github.com/ultralytics/yolov5/blob/34df5032a7d2e83fe3d16770a03bd129b115d184/models/common.py#L38-L51
@PraveenMNaik models are in models/common.py:
Sir, where is the definition for nn.SiLu (activation function)
Hi. I have a question. if I want to modify the Yolov5 architecture, then I have to change only the Yolov5l.yaml file or do I also have to change any coding stuff? Please respond thanks
@AdnanMunir294 hi there,
To modify the YOLOv5 architecture, you will need to make changes to both the yolov5l.yaml
file and the code implementation. The yolov5l.yaml
file defines the architecture configuration, including the backbone and head structure, while the code implementation in the YOLOv5 repository (models/...py
files) handles the actual execution of the architecture.
Therefore, to effectively modify the architecture, you will need to ensure that both the configuration in the yaml
file and the corresponding code implementation are updated accordingly.
Feel free to reach out if you have any further questions or need additional assistance.
Thanks!
❔Question
Hi @glenn-jocher,
May I know the meaning of each of these parameters of the backbone and head inside the .yaml file? Also there are three integers in front of "Concat", what is the meaning of these values?![image](https://user-images.githubusercontent.com/66768413/93553437-8a187480-f9a5-11ea-8771-163b9e8303e0.png)
Many thanks, JiaLim98