APLOSE detections#400
Conversation
| "confidence_indicator_label", | ||
| "confidence_indicator_level", | ||
| "label", | ||
| "level", |
There was a problem hiding this comment.
The column names hasn't change on APLOSE side
There was a problem hiding this comment.
damn good catch, I didn't see that my refactor affected also the dict keys!
I really should write an integration test before messing with everything 🥸
|
|
|
Good catch, I indeed didn't notice the (if exists) part in the csv file description, I'll fix that shortyl! |
|
@Gautzilla I have an error when using a yolo-aplose-formatted csv because i do not have all the required columns annotations = Detection.from_csv(Path(r"C:\Users\dupontma2\Downloads\check\C16D1_ST7189_yolo_v2_prediction.csv"))
Traceback (most recent call last):
File "C:\Users\dupontma2\Documents\Git\OSmOSE\OSEkit\.venv\Lib\site-packages\IPython\core\interactiveshell.py", line 3701, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<ipython-input-5-a298c7373fb5>", line 1, in <module>
annotations = Detection.from_csv(Path(r"C:\Users\dupontma2\Downloads\check\C16D1_ST7189_yolo_v2_prediction.csv"))
File "C:\Users\dupontma2\Documents\Git\OSmOSE\OSEkit\src\osekit\core\detection.py", line 413, in from_csv
return [cls.from_dict(record) for record in records]
~~~~~~~~~~~~~^^^^^^^^
File "C:\Users\dupontma2\Documents\Git\OSmOSE\OSEkit\src\osekit\core\detection.py", line 303, in from_dict
detection_id=row["annotation_id"],
~~~^^^^^^^^^^^^^^^^^
KeyError: 'annotation_id'We need to specify which column are in deed mandatory, to me that would be:
@ElodieENSTA what do you think ? |
I don't think the filename is mandatory with continuous datasets, since you have the timestamps. So start/end relative time should not be mandatory as well. |
Maybe the bare minimum should only be what a detector outputs at bare minimum?
Not sure which parameters truly are mandatory in every detector output tho |
🖼️ Annotation results are coming to OSEkit!
How does it work
The idea is to be able to load APLOSE results csv into OSEkit as a collection of new
Annotationobjects:The annotations could then be filtered thanks to their properties :
Using the
Annotationwith OSEkitThe
Annotationclass inherits from theEventclass: itsbeginandendproperties can be used to access the audio corresponding to the annotation box easily, e.g.: