diff --git a/get_train_annot_YOLO.py b/get_train_annot_YOLO.py
index e3d3a2df6388b66be2582b11da884db477ed69fe..b637accd0f09f3f40401a81561e4b61c839efd81 100644
--- a/get_train_annot_YOLO.py
+++ b/get_train_annot_YOLO.py
@@ -122,7 +122,7 @@ def process(x):
 
         for idxs, row in tab.iterrows():
             species = row.Code
-            x_pxl = (row.midl - row.start) / duration
+            x_pxl = (row.midl - offset) / duration
             width_pxl = (row.stop-row.start)/duration
 
             if args.mode == 'uniform':