-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save detection area with CSVSink #1397
Comments
I've also got some functions which will convert the output of JSONSink to coco_json, for importing as pre-annotations. This currently has to calc the area and parse the xyxyxyxy with regex, so if these were exposed more simply this process would be streamlined |
@robmarkcole, you should pass the whole with sv.CSVSink(csv_path) as sink:
sink.append(detections, {"area": detections.area}) |
@robmarkcole, I see you reacted. Did that solve your problem? If so, I'm closing the issue. ;) |
I still think it would be a nice feature to have out of the box, along with xyxy for the polygon
|
Hi @robmarkcole, unfortunately, I won't have time to dig deeper into this problem this week. I'm not going to lie; Let me tag @LinasKo here so he can take a look next week. |
Hi @robmarkcole 👋 I'll look into this. |
This goes surprisingly deep. @robmarkcole, syntax-wise, the cleanest solution is to add the areas into
This will modify the detections object if you're using it later, however. @SkalskiP, I can't find @PawelPeczek-Roboflow's issue where he asked for collection-level storage in The issue here is, basically, A good solution would be to first solve Pawel's request, and then come back to edit CSVSink (with deprecations). |
@LinasKo, how about we collect the list of potential improvements for |
A related feature request, DataFrameSink as a convenience to avoid csv_path = f'/tmp/{image_id}.csv'
with sv.CSVSink(csv_path) as sink:
sink.append(detections, {})
df = pd.read_csv(csv_path) |
Search before asking
Description
I would like to save all the Detections data to csv. Currently the
area
is not saved, and my approach below isn't successful. This FR is to save the area (and potentially other detection attributes that are currently not saved)Use case
I will perform filtering in a separate application
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: