sgoldenlab / simba

SimBA (Simple Behavioral Analysis), a pipeline and GUI for developing supervised behavioral classifiers
https://simba-uw-tf-dev.readthedocs.io/
GNU General Public License v3.0
287 stars 140 forks source link

behavior annotation with mat file #93

Closed Wutaijing9 closed 3 years ago

Wutaijing9 commented 3 years ago

**Most of our previous manual behavior annotation was using matlab. So we got a .mat file and a txt file indicating behavior start and end frame, time and behavior. Is this possible to use them to predict behavior in simba? One sample as follows: scorevideo LOG File: logWT_fmO2_oil_ovx_200814.mat

VIDEO FILE SET Videotype: AVI Directory: D:**\200814 Video file set: WT_fmO2_oil_ovx_200814 1-65693 Play duration (min): 43.795 Frames/sec of files: 25 No. of subjects: 2

COMMAND SET AND SETTINGS

start|stop|subject|description

c 0 contact female d 0 feeding e 0 ejaculation f 0 female g 0 genital grooming h 0 head mount i 0 intromit m 0 mount s 0 sniff female t 0 be contacted u 0 be sniffed v 0 USV w 0 try to mount z 0 grooming

subject 1: subject1 subject 2: subject2 subj#: 0=either 1=subject1 2=subject2 3=both No. of simultaneous behaviors: one

RAW LOG

frame|time(min:sec)|command

9727 6:29.08 s 9772 6:30.88 12591 8:23.64 s 12605 8:24.20 12737 8:29.48 s 12820 8:32.80 13519 9:00.76 s 13542 9:01.68 16240 10:49.60 s 16257 10:50.28 18862 12:34.48 s 18897 12:35.88 18993 12:39.72 s 19034 12:41.36 19097 12:43.88 m 19121 12:44.84 19790 13:11.60 s 19813 13:12.52 20567 13:42.68 s 20587 13:43.48 21055 14:02.20 m 21201 14:08.04 i 21308 14:12.32 21333 14:13.32 s 21536 14:21.44 24421 16:16.84 s 24438 16:17.52 32025 21:21.00 s 32059 21:22.36 32308 21:32.32 s 32344 21:33.76 32750 21:50.00 s 32803 21:52.12 38671 25:46.84 s 38680 25:47.20 41084 27:23.36 s 41169 27:26.76 43743 29:09.72 s 43789 29:11.56 47880 31:55.20 s 47957 31:58.28 48013 32:00.52 m 48029 32:01.16 i 48185 32:07.40 s 48215 32:08.60 49277 32:51.08 s 49299 32:51.96 49372 32:54.88 m 49390 32:55.60 i 49737 33:09.48

FULL LOG

frame|time(min:sec)|description|action|subject

9727 6:29.08 sniff female either start 9772 6:30.88 sniff female either stop 12591 8:23.64 sniff female either start 12605 8:24.20 sniff female either stop 12737 8:29.48 sniff female either start 12820 8:32.80 sniff female either stop 13519 9:00.76 sniff female either start 13542 9:01.68 sniff female either stop 16240 10:49.60 sniff female either start 16257 10:50.28 sniff female either stop 18862 12:34.48 sniff female either start 18897 12:35.88 sniff female either stop 18993 12:39.72 sniff female either start 19034 12:41.36 sniff female either stop 19097 12:43.88 mount either start 19121 12:44.84 mount either stop 19790 13:11.60 sniff female either start 19813 13:12.52 sniff female either stop 20567 13:42.68 sniff female either start 20587 13:43.48 sniff female either stop 21055 14:02.20 mount either start 21201 14:08.04 mount either stop 21201 14:08.04 intromit either start 21308 14:12.32 intromit either stop 21333 14:13.32 sniff female either start 21536 14:21.44 sniff female either stop 24421 16:16.84 sniff female either start 24438 16:17.52 sniff female either stop 32025 21:21.00 sniff female either start 32059 21:22.36 sniff female either stop 32308 21:32.32 sniff female either start 32344 21:33.76 sniff female either stop 32750 21:50.00 sniff female either start 32803 21:52.12 sniff female either stop 38671 25:46.84 sniff female either start 38680 25:47.20 sniff female either stop 41084 27:23.36 sniff female either start 41169 27:26.76 sniff female either stop 43743 29:09.72 sniff female either start 43789 29:11.56 sniff female either stop 47880 31:55.20 sniff female either start 47957 31:58.28 sniff female either stop 48013 32:00.52 mount either start 48029 32:01.16 mount either stop 48029 32:01.16 intromit either start 48185 32:07.40 intromit either stop 48185 32:07.40 sniff female either start 48215 32:08.60 sniff female either stop 49277 32:51.08 sniff female either start 49299 32:51.96 sniff female either stop 49372 32:54.88 mount either start 49390 32:55.60 mount either stop 49390 32:55.60 intromit either start 49737 33:09.48 intromit either stop

NOTES


MARKS

frame|time(min:sec)|mark name

1     0:00.04    video start

8565 5:42.60 assay start 53565 35:42.60 assay end 65693 43:47.72 video end

sgoldenlab commented 3 years ago

Hi @Wutaijing9 - I think so - which software were these created in? Was it your own custom scripts? Reminds me of Piotr's matlab annotation toolbox output files I have seen from caltech.