Problem in using deeplabcut.convertcsv2h5

I need to convert my csv file which is same exact format as yours to h5 however it doesn’t work. Could you please help me figure what is exactly wrong?

I have the following setup:

(deeplabcut)[jalal@scc-x05 moth]$ head moth2Dpose.csv 
scorer,Mona,Mona,Mona,Mona,Mona,Mona,Mona,Mona
bodyparts,head,head,rightWingTip,rightWingTip,leftWingTip,leftWingTip,abdomenTip,abdomenTip
coords,x,y,x,y,x,y,x,y
labeled-data/moth/frame001.png,494.2244837,240.7295774,712.0363866,269.7266196,311.2984476,337,477.7910148,292.7525652
labeled-data/moth/frame002.png,494.9006156,240.4824949,695.4159712,234.3256987,286.159703,297.5113911,475.6516914,292.7525652
labeled-data/moth/frame003.png,495.1558141,241.1202971,664.0746166,184.8685298,280.2320841,238.2186337,474.6163777,294.0813382
labeled-data/moth/frame004.png,495.4410572,242.0584384,620.5228669,140.8098868,298.6642961,175.1677438,474.4262156,295.5406691
labeled-data/moth/frame005.png,495.7263003,242.9965797,602.1612651,119.9858157,323.3444567,134.9478643,471.5737844,299.710186
labeled-data/moth/frame006.png,496.12,243.31,617.3570735,115.1268658,340.0202409,124.7100768,469.6721635,302.6288478
labeled-data/moth/frame007.png,496.19,243.74,640.7839446,126.2330371,333.3499272,133.4853233,467.7705427,306.5898889
(deeplabcut)[jalal@scc-x05 moth]$ pwd
/projectnb/ivcgroup/jalal/moth_resnet50/moth-filtered/labeled-data/moth

Here how the png files look like:

(deeplabcut)[jalal@scc-x05 moth]$ ls -l | head
total 153760
-rw-r--r-- 1 jalal ivcgroup 174702 Dec  6 18:15 frame001.png
-rw-r--r-- 1 jalal ivcgroup 174702 Dec  6 18:15 frame002.png
-rw-r--r-- 1 jalal ivcgroup 174702 Dec  6 18:15 frame003.png
-rw-r--r-- 1 jalal ivcgroup 174702 Dec  6 18:15 frame004.png
-rw-r--r-- 1 jalal ivcgroup 174702 Dec  6 18:15 frame005.png
-rw-r--r-- 1 jalal ivcgroup 174702 Dec  6 18:15 frame006.png
-rw-r--r-- 1 jalal ivcgroup 174702 Dec  6 18:15 frame007.png
-rw-r--r-- 1 jalal ivcgroup 174702 Dec  6 18:15 frame008.png
-rw-r--r-- 1 jalal ivcgroup 174702 Dec  6 18:15 frame009.png
(deeplabcut)[jalal@scc-x05 moth]$ pwd
/projectnb/ivcgroup/jalal/moth_resnet50/moth-filtered/labeled-data/moth


(deeplabcut)[jalal@scc-x05 moth-filtered]$ ls
total 163
-rw-r--r-- 1 jalal ivcgroup   334 Dec  6 17:59 moth.qsub
drwxr-sr-x 2 jalal ivcgroup   512 Dec  6 18:03 training-datasets
drwxr-sr-x 2 jalal ivcgroup   512 Dec  6 18:03 evaluation-results
drwxr-sr-x 2 jalal ivcgroup   512 Dec  6 18:03 dlc-models
drwxr-sr-x 3 jalal ivcgroup   512 Dec  6 18:09 ..
drwxr-sr-x 2 jalal ivcgroup 32768 Dec  6 18:27 videos
-rw-r--r-- 1 jalal ivcgroup  1181 Dec  6 18:27 config.yaml
-rw-r--r-- 1 jalal ivcgroup  1254 Dec  6 18:28 moth.py
drwxr-sr-x 7 jalal ivcgroup 32768 Dec  6 18:28 .
drwxr-sr-x 3 jalal ivcgroup 32768 Dec  6 18:37 labeled-data
(deeplabcut)[jalal@scc-x05 moth-filtered]$ pwd
/projectnb/ivcgroup/jalal/moth_resnet50/moth-filtered
(deeplabcut)[jalal@scc-x05 moth-filtered]$ cat config.yaml 
# Project definitions (do not edit)
Task: moth-filtered
scorer: Mona
date: Dec6

# Project path (change when moving around)
project_path: /projectnb/ivcgroup/jalal/moth_resnet50/moth-filtered

# Annotation data set configuration (and individual video cropping parameters)
video_sets:
  /projectnb/ivcgroup/jalal/moth_resnet50/moth-filtered/videos/moth.avi:
    crop: 0, 800, 0, 600
bodyparts:
- head
- rightWingTip
- leftWingTip
- abdomenTip
start: 0
stop: 1
numframes2pick: 100

# Plotting configuration
skeleton: [[head, rightWingTip], [head, leftWingTip], [head, abdomenTip], [leftear, rightear]]
skeleton_color: black
pcutoff: 0.1
dotsize: 5
alphavalue: 0.5
colormap: jet

# Training,Evaluation and Analysis configuration
TrainingFraction:
- 0.95
iteration: 0
resnet:
snapshotindex: -1
batch_size: 8

# Cropping Parameters (for analysis and outlier frame detection)
cropping: false
#if cropping is true for analysis, then set the values here:
x1: 0
x2: 640
y1: 277
y2: 624

# Refinement configuration (parameters from annotation dataset configuration also relevant in this stage)
corner2move2:
- 50
- 50
move2corner: true
default_net_type: resnet_50
default_augmenter: default

however, I cannot convert the csv to h5 even though I am following the same exact format as you step by step. Could you please what might be missing?

(deeplabcut)[jalal@scc-x05 moth-filtered]$ python
Python 3.6.7 | packaged by conda-forge | (default, Feb 20 2019, 02:51:38) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import deeplabcut
>>> deeplabcut.convertcsv2h5("/projectnb/ivcgroup/jalal/moth_resnet50/moth-filtered/config.yaml")
Do you want to convert the csv file in folder: /projectnb/ivcgroup/jalal/moth_resnet50/moth-filtered/labeled-data/moth ?
yes/noyes
Attention: /projectnb/ivcgroup/jalal/moth_resnet50/moth-filtered/labeled-data/moth does not appear to have labeled data!

fixed the problem here https://github.com/AlexEMG/DeepLabCut/issues/522

1 Like