-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Can't import dataset into Pytorch (saved locally). #6047
Comments
Same issue, same version. I'm copying the modules I need and making the fix myself on my end. |
Changing that line to If the task is a The problem is when a model is cached, and loaded back, it is loaded as a def _deserialize_model(self, obj: _CacheObject, model_type: _ModelType) -> _ModelType:
if issubclass(model_type, OpenApiModel):
return cast(OpenApiModel, model_type)._new_from_openapi_data(**obj)
elif issubclass(model_type, _CacheObjectModel):
return cast(_CacheObjectModel, model_type).load(obj)
else:
raise NotImplementedError("Unexpected model type") I think the idea is that we are using the @define
class _OfflineTaskModel(_CacheObjectModel):
api_model: models.ITaskRead
labels: List[models.ILabel] However this doesnt actually work in |
<!-- Raise an issue to propose your change (https://github.com/opencv/cvat/issues). It helps to avoid duplication of efforts from multiple independent contributors. Discuss your ideas with maintainers to be sure that changes will be approved and merged. Read the [Contribution guide](https://opencv.github.io/cvat/docs/contributing/). --> <!-- Provide a general summary of your changes in the Title above --> ### Motivation and context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. Describe your changes in detail, add screenshots. --> This was broken in 4fc494f. Add a test to cover this case. Fixes #6047.
I'm currently trying to import a small dataset I've created from CVAT into PyTorch, so that I can use it in combination with DeepLabV3+. However it always fails, giving me the AttributeError '_OfflineTaskModel' object has no attribute 'updated_date'.
My actions before raising this issue
I've searched for the error message and gone through the documentation. Neither has mentioned anything about it.
Steps to Reproduce (for bugs)
client = make_client(CVAT_HOST, credentials=(CVAT_USER, CVAT_PASS)
Expected Behaviour
I'd expect the dataset to properly load.
Current Behaviour
It doesn't load, because it doesn't have the Attribute 'updated_date'
Context
My Master Thesis revolves around computer vision and I also need to annotate a lot of data, that needs to be segmented later on. I was advised to use CVAT for annotation and should try to do segmentation with the DeepLabV3+ Architecture. As my data is not yet generated, I've found a small dataset that's similar to what I'll be doing and I wanted to use it as a small proof of concept. But right now, I can't load the dataset, because of that attribute error. I don't know if there is a seperate command for loading datasets that are not stored on a cloud service, but my search so far does not support that claim.
Your Environment
The text was updated successfully, but these errors were encountered: