antingshen / BeaverDam

Video annotation tool for deep learning training labels
BSD 2-Clause "Simplified" License
202 stars 100 forks source link

Using management shell to add video objects #146

Closed exoticmoose closed 6 years ago

exoticmoose commented 6 years ago

Is there any fast tutorial for adding video objects using the Python management shell. I was able to figure out to import the models db from Django, but I'm not familiar enough with Python to get through the whole process. Thanks!

antingshen commented 6 years ago

After importing the model class (Video) you instantiate it like any other python object: v = Video(property_a=a, property_b=b) then call v.save() to save it to the database. You can loop over this whole thing as well.

exoticmoose commented 6 years ago

Awesome, makes sense now. Thanks!