Skip to content

Commit

Permalink
Minor changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Manovich committed Feb 7, 2019
1 parent 450c4c7 commit dcbbcb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cvat/apps/engine/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ class Meta:


class Annotation(models.Model):
id = models.BigAutoField(primary_key=True)
job = models.ForeignKey(Job, on_delete=models.CASCADE)
label = models.ForeignKey(Label, on_delete=models.CASCADE)
frame = models.PositiveIntegerField()
Expand All @@ -209,7 +210,6 @@ class Meta:
default_permissions = ()

class BoundingBox(Shape):
id = models.BigAutoField(primary_key=True)
xtl = models.FloatField()
ytl = models.FloatField()
xbr = models.FloatField()
Expand All @@ -220,7 +220,6 @@ class Meta:
default_permissions = ()

class PolyShape(Shape):
id = models.BigAutoField(primary_key=True)
points = models.TextField()

class Meta:
Expand Down Expand Up @@ -252,13 +251,13 @@ class LabeledPointsAttributeVal(AttributeVal):
points = models.ForeignKey(LabeledPoints, on_delete=models.CASCADE)

class ObjectPath(Annotation):
id = models.BigAutoField(primary_key=True)
shapes = models.CharField(max_length=10, default='boxes')

class ObjectPathAttributeVal(AttributeVal):
track = models.ForeignKey(ObjectPath, on_delete=models.CASCADE)

class TrackedObject(models.Model):
id = models.BigAutoField(primary_key=True)
track = models.ForeignKey(ObjectPath, on_delete=models.CASCADE)
frame = models.PositiveIntegerField()
outside = models.BooleanField(default=False)
Expand Down
2 changes: 2 additions & 0 deletions cvat/apps/engine/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def data(self, request, pk):
serializer.save()
return Response(serializer.data, status=status.HTTP_201_CREATED)

#@action(detail=True, methods=['GET', 'DELETE', 'POST'], serializer_class=None)
@action(detail=True, methods=['GET'], serializer_class=None)
def annotations(self, request, pk):
pass
Expand Down Expand Up @@ -189,6 +190,7 @@ class JobViewSet(viewsets.GenericViewSet,
queryset = Job.objects.all()
serializer_class = JobSerializer

#@action(detail=True, methods=['GET', 'DELETE', 'POST'], serializer_class=None)
@action(detail=True, methods=['GET'], serializer_class=None)
def annotations(self, request, pk):
pass
Expand Down

0 comments on commit dcbbcb7

Please sign in to comment.