add test script
This commit is contained in:
parent
b7393dff04
commit
ea02bb7ee3
20
test.py
Normal file
20
test.py
Normal file
@ -0,0 +1,20 @@
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
from IPython import embed, embed_kernel
|
||||
from tracking_result import TrackingResult
|
||||
import image_marker as im
|
||||
|
||||
|
||||
def main(filename):
|
||||
tr = TrackingResult(filename)
|
||||
tr.plot(bodypart="snout")
|
||||
tank_task = im.MarkerTask("tank limits", ["bottom left corner", "top left corner", "top right corner", "bottom right corner"], "Mark tank corners")
|
||||
feeder_task = im.MarkerTask("Feeder positions", list(map(str, range(1, 2))), "Mark feeder positions")
|
||||
tasks = [tank_task, feeder_task]
|
||||
image_marker = im.ImageMarker(tasks)
|
||||
marker_positions = image_marker.mark_movie(filename, 1)
|
||||
print(marker_positions)
|
||||
|
||||
if __name__ == "__main__":
|
||||
filename = "2020.12.11_lepto48DLC_resnet50_boldnessDec11shuffle1_200000.h5"
|
||||
main(filename)
|
Loading…
Reference in New Issue
Block a user