Tlaloc-Es / labelme2yolov7segmentation

Conver labelme annotation format to yolov7 annotation format for segmentation.
4 stars 0 forks source link

labelme2yolo #2

Open Fatih-Haslak opened 5 months ago

Fatih-Haslak commented 5 months ago

class LabelMeShape(BaseModel): File "C:\Users\Mert\Desktop\labelme2yolov7segmentation\labelme2yolov7segmentation\datatypes.py", line 8, in LabelMeShape points: List[conlist(float, min_items=2, max_items=2)] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: conlist() got an unexpected keyword argument 'min_items'

Tlaloc-Es commented 5 months ago

Hi which version of pydantic are you using?

mkutu commented 2 months ago

@Fatih-Haslak

from this thread I changed this line: https://github.com/Tlaloc-Es/labelme2yolov7segmentation/blob/7a73573a9500cf12bda235f0e470296106f37988/labelme2yolov7segmentation/datatypes.py#L8

to this:

points: List[conlist(item_type=float, min_length=2, max_length=2)]

And it worked