Skip to content

Conversation

@montanier
Copy link
Collaborator

A lot of cleaning is probably needed. But basically there is a labelstudio and an mlbackend with yolo running.

with open(csv_file, 'r', encoding='utf-8-sig') as f:
reader = csv.DictReader(f, delimiter=';')

for row in reader:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plutot qu'une grosse boucle on pourrait créer une fonction qui prend un row en entrée et appeler un map. Ca ferait un code plus organisé.

except Exception:
return 'localhost'

def convert_csv_to_labelstudio(csv_file, output_file, limit=None, force=False, host=None):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a déjà une pipeline qui transforme le CSV (à terme un appel API) en un parquet propre. C'est peut être plus pertinent de partir dessus.

print(f"Converted {len(tasks)} tasks to {output_file}")

if __name__ == "__main__":
parser = argparse.ArgumentParser(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A la base j'aurais utilisé click que je trouve plus propre avec des decorateurs.

from pathlib import Path


def get_lan_ip():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On est obligé de réécrire ca? Il n'y a pas une lib pour ca?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants