-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
New: Ultralytics YOLO-Human #12702
base: main
Are you sure you want to change the base?
New: Ultralytics YOLO-Human #12702
Conversation
This reverts commit bd5587c.
@Laughing-q @ambitious-octopus val test is also failing because our
Save JSON is working correct:
|
@glenn-jocher Updated https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n-human.pt with a freshly trained model. |
@glenn-jocher @ambitious-octopus Guys I removed ultralytics/ultralytics/engine/results.py Lines 332 to 366 in bac868c
ultralytics/ultralytics/models/yolo/detect/val.py Lines 256 to 263 in 7593b4a
So I updated our detect/obb/human tasks with Results.save_txt . Other tasks i.e segment/pose actually have the save_one_txt part commented so I left it there for now and let's develop these two in another PR later.ultralytics/ultralytics/models/yolo/segment/val.py Lines 157 to 158 in 7593b4a
|
@glenn-jocher Uploaded HUB-format datataset PR. |
@glenn-jocher Meanwhile I noticed that we have a lot duplicated code in
Looking into this PR: #12645, the author had to update each val.py to add the feature because we have multiple modified versions of this method. And that's why @ambitious-octopus encountered the target_img key missing issue after the PR merged(because I had to create another modified version for human task).I actually tried to refactor this part a bit in the OBB PR so we don't have a modified version of update_metrics lying in obb/val.py . But there's still a lot duplication with other tasks.I think I'll revisit this part of code and try to eliminate the duplicated part as much as possible later some day in another PR. |
@ambitious-octopus the CI tests are failing, seems to related to new updated yolov8n-human.pt And that's because the model was trained with |
@ambitious-octopus let's reset the weight back, and later today I'll launch new training on our server with |
@glenn-jocher @ambitious-octopus ok I've re-uploaded the weight and now everything works properly in tests except the hub dataset, which I guess it'll be good when the PR that @ambitious-octopus opened merged. :) And now there's several gpus freed on our server, I'll launch several training right now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not serve the docs locally, just quickly reviewed the raw markdown on GitHub. A few notes and suggestions, but overall looks excellent!
@@ -0,0 +1,16 @@ | |||
--- | |||
description: TODO ADD DESCRIPTION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fill in TODO
sections for predict.md
and train.md
Human detection and attributes estimation is a task that involves identifying humans in an image or video stream and estimating their attributes, such as age, gender, weight, height, and ethnicity. | ||
The output of the detector is a set of bounding boxes that enclose the humans in the image, along with class labels, confidence scores, and estimated attributes for each person. This task is useful for applications in surveillance, retail analytics, and human-computer interaction. | ||
|
||
## [Models](https://github.com/ultralytics/ultralytics/tree/main/ultralytics/cfg/models/v8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want the header to be a link like this? I haven't looked at how it renders, but I don't think this is normally something we do.
|
||
## [Models](https://github.com/ultralytics/ultralytics/tree/main/ultralytics/cfg/models/v8) | ||
|
||
YOLOv8 pretrained Human models are shown here. Detect, Segment and Pose models are pretrained on the [COCO](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/coco.yaml) dataset, while Classify models are pretrained on the [ImageNet](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/ImageNet.yaml) dataset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of referencing the YAML files, probably better to reference the docs pages for the relevant datasets.
|
||
YOLOv8 pretrained Human models are shown here. Detect, Segment and Pose models are pretrained on the [COCO](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/coco.yaml) dataset, while Classify models are pretrained on the [ImageNet](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/ImageNet.yaml) dataset. | ||
|
||
[Models](https://github.com/ultralytics/ultralytics/tree/main/ultralytics/cfg/models) download automatically from the latest Ultralytics [release](https://github.com/ultralytics/assets/releases) on first use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if Models
here needs to be a link.
|
||
!!! note | ||
|
||
It is important to note that these models have been trained on a specially curated, artificially annotated version of the COCO dataset. This custom dataset was meticulously crafted to enhance the models' performance on specific tasks by incorporating additional annotations and adjustments beyond those available in the public COCO dataset. Due to proprietary reasons, this enhanced version of the dataset is not publicly available. The artificial annotations were designed to provide more comprehensive and nuanced data, enabling the models to achieve higher accuracy and robustness in their predictions. The proprietary nature of this dataset ensures that the models possess a competitive edge, offering advanced capabilities and superior performance in their respective applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few notes:
- I think that "artificially annotated" should be bolded and underlined artificially annotated for emphasis
- I don't think a reason ("Due to proprietary reasons") for why the dataset isn't available should be given, just that we've decided to not make it publicly available.
- I think this section should be removed "ensures that the models possess a competitive edge, offering advanced capabilities and superior performance" as it's fairly baseless and seems (to me) like it's asking for trouble.
|
||
- Weight (Kg): The weight of the person is annotated in kilograms. This numeric value is essential for applications requiring precise biometric data. | ||
|
||
- Height (Cm): The height of the person is annotated in centimeters. Accurate height measurements are crucial for many analytical and identification purposes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Height (Cm)
+ Height (cm)
- **Real-time Human Attribute Estimation**: Leverages the computational speed of CNNs to provide fast and accurate human attribute estimation in real-time. | ||
- **Efficiency and Performance**: Optimized for reduced computational and resource requirements without sacrificing performance, enabling deployment in real-time applications. | ||
- **Comprehensive Attribute Estimation**: Capable of estimating multiple human attributes such as age, gender, ethnicity, weight, and height, providing detailed demographic analysis. | ||
- **Detection of Flocks of Humans**: Enhanced to detect both individual humans and groups of humans, expanding its applicability in various scenarios. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flocks of Humans
|
||
!!! note | ||
|
||
It is important to note that these models have been trained on a specially curated, artificially annotated version of the COCO dataset. This custom dataset was meticulously crafted to enhance the models' performance on specific tasks by incorporating additional annotations and adjustments beyond those available in the public COCO dataset. Due to proprietary reasons, this enhanced version of the dataset is not publicly available. The artificial annotations were designed to provide more comprehensive and nuanced data, enabling the models to achieve higher accuracy and robustness in their predictions. The proprietary nature of this dataset ensures that the models possess a competitive edge, offering advanced capabilities and superior performance in their respective applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments in docs/en/tasks/human.md
on this text.
|
||
### Val Usage | ||
|
||
Validate trained YOLOv8n-human model accuracy on the COCO8-human dataset. No argument need to passed as the `model` retains it's training `data` and arguments as model attributes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would include data="coco8-human"
even tho it will work without. Trust me, it will avoid confusion later.
|
||
## Val | ||
|
||
Validate trained YOLOv8n-human model accuracy on the COCO8-human dataset. No argument need to passed as the `model` retains it's training `data` and arguments as model attributes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment from earlier
π οΈ PR Summary
Made with β€οΈ by Ultralytics Actions
π Summary
Introducing new YOLOHuman model for human attribute detection! π
π Key Changes
YOLOHuman
class as part of the model imports.HumanDataset
, for loading and processing human-related datasets.Human
object in results to encapsulate detected human attributes.__init__.py
to include YOLOHuman.HumanPredictor
,HumanTrainer
, andHumanValidator
under the new YOLO human module for prediction, training, and validation.π― Purpose & Impact