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

Cityperson json label to yolo label #2727

Closed
swaingotnochill opened this issue Apr 7, 2021 · 12 comments
Closed

Cityperson json label to yolo label #2727

swaingotnochill opened this issue Apr 7, 2021 · 12 comments
Labels
question Further information is requested Stale

Comments

@swaingotnochill
Copy link

❔Question

I am trying to evaluate the model( pretrained weights) on Cityperson dataset. I wish to convert the labels into yolo format, but can't do it. Do you have any idea how should I approach this? Also, is there any other thing I should take care for the evaluation?

Additional context

I already have the labels for the cityperson dataset. The question is I wish to replace all the pedestrian, rider, etc with a single class and also am not sure of the object class Id.
Any suggestions is valuable.

@swaingotnochill swaingotnochill added the question Further information is requested label Apr 7, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2021

👋 Hello @swaingotnochill, thank you for your interest in 🚀 YOLOv5! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.

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 training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.

For business inquiries or professional support requests please visit https://www.ultralytics.com or email Glenn Jocher at [email protected].

Requirements

Python 3.8 or later with all requirements.txt dependencies installed, including torch>=1.7. To install run:

$ pip install -r requirements.txt

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

CI CPU testing

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), testing (test.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.

@glenn-jocher
Copy link
Member

glenn-jocher commented Apr 7, 2021

@swaingotnochill you should export your labels into YOLO format and create a citypersons.yaml file for this dataset. Then you can train and test normally using train.py and test.py. See Train Custom Data tutorial to get started:

YOLOv5 Tutorials

@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2021

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.

@NguyenThanhBinh98
Copy link

Question

I am trying to evaluate the model( pretrained weights) on Cityperson dataset. I wish to convert the labels into yolo format, but can't do it. Do you have any idea how should I approach this? Also, is there any other thing I should take care for the evaluation?

Additional context

I already have the labels for the cityperson dataset. The question is I wish to replace all the pedestrian, rider, etc with a single class and also am not sure of the object class Id. Any suggestions is valuable.

@NguyenThanhBinh98
Copy link

Hi swaingotnochill . Can you share with me the labeled cityperson dataset . I want train Yolov5 with that

@glenn-jocher
Copy link
Member

glenn-jocher commented Nov 5, 2021

@NguyenThanhBinh98 @swaingotnochill yes it would be great to create a Cityperson.yaml for everyone to be able to autodownload this dataset.

Please see our ✅ Contributing Guide to get started.

@swaingotnochill
Copy link
Author

@NguyenThanhBinh98 @glenn-jocher I don't have the dataset as of now. But the dataset is available in https://www.cityscapes-dataset.com/ . I have wrote the script for converting the cityperson labels to yolo lables. If that's ok, maybe I can create an PR for that.

@glenn-jocher
Copy link
Member

@swaingotnochill yes great! If you can create a Cityscapes.yaml similar to our other dataset yamls and start populating it what you have, that will help get this started.

@swaingotnochill
Copy link
Author

swaingotnochill commented Nov 5, 2021

@glenn-jocher I don't think that is possible. I had a conversation with a CityScape person, and they don't allow free download of the datasets. Their dataset is available only for research/education purpose. So , they don't have an Open Download Link. When I downloaded the dataset, I had to submit my University Student details to be verified. This is a troublesome process, but that is how they operate :(

@glenn-jocher
Copy link
Member

@swaingotnochill yes this should be ok. We have the same setup in place with the xView dataset. The users download xView zips manually to /datasets, and then run python train.py --data xView.yaml, and we automatically extract and convert to YOLO format and start training.

Also we are unaffected by dataset licensing since we are not an end user. It would be up to end users (like yourself) to download CityScape zips first and ensure they are following license guidelines.

# YOLOv5 🚀 by Ultralytics, GPL-3.0 license
# xView 2018 dataset https://challenge.xviewdataset.org
# -------- DOWNLOAD DATA MANUALLY from URL above and unzip to 'datasets/xView' before running train command! --------
# Example usage: python train.py --data xView.yaml
# parent
# ├── yolov5
# └── datasets
# └── xView ← downloads here

@codename-cn
Copy link

@swaingotnochill you don't necessarily have to provide the dataset itself. However, you could have provided the script for the conversion.

@glenn-jocher
Copy link
Member

@codename-cn Sharing your script for converting Cityperson labels to YOLO format would indeed be very helpful for the community! If you could create a pull request with your script, that would be fantastic. This way, others can benefit from your work once they have access to the dataset themselves. 😊👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Stale
Projects
None yet
Development

No branches or pull requests

4 participants